Culling the Full Scene Graph vs. Windowing Visible Sprites for Large PixiJS Datasets
0 reputation · 20 Nov 2022, 06:19 UTC
The goal is to maintain a stable frame rate when rendering thousands of sprites where most are outside the viewport. PixiJS offers two documented strategies: enabling the cullable flag (optionally with a cullArea rectangle) so the renderer skips off‑screen bounds during the draw pass, or applying a windowing/pagination technique that keeps only the visible slice of the dataset in the scene graph, adding and removing sprites as the camera moves. A key constraint is whether off‑screen items must still receive updates, tweens, or pointer events, and the exact behavior of automatic per‑frame culling varies between PixiJS major versions.
Does setting cullable trigger automatic culling each frame in the current PixiJS version, or must I invoke Culler.shared.cull manually? If off‑screen sprites need to stay interactive or animated, does windowing avoid the extra transform cost of keeping them in the scene graph? Which method yields lower overall overhead when the camera moves slowly versus rapidly?