I have a very long page with multiple canvases. They don't overlap each other, and are mostly used separately for PIXI.js to play spritesheets.
I use requestAnimationFrame
to render each canvas.
I have a few questions since I'm unsure how to optimize.
1) When a canvas is offscreen, do I need to cancelAnimationFrame
? Or does it not matter because it is offscreen and therefore won't be painted?
2) Should I have all my render
functions within the same requestAnimationFrame? Will that improve performance?
Any other suggestions?