What problem does it solve?
ParticleContainer in PixiJS exists to let you draw extremely large numbers of lightweight sprites in a single draw call, without paying the per-object overhead of full Containers.
Core Features & Use Cases
- Batch sprite rendering at scale: Use ParticleContainer for particle effects, bullet patterns, and other cases where thousands of similar sprites must render efficiently.
- High-performance particle management: Add and remove particles via
addParticle/removeParticle and manipulate them through the particleChildren array.
- GPU upload optimization: Control which particle attributes are re-uploaded every frame with
dynamicProperties, and use update() only when static attributes change.
- Practical constraints that prevent misuse: Particles are stored in
particleChildren (not children), ParticleContainer rejects normal display-object children, and boundsArea is effectively required for correct culling and hit testing.
Quick Start
Create a ParticleContainer configured with a shared texture, a boundsArea, and only the dynamic properties you plan to animate, then add Particle instances using addParticle and attach the ParticleContainer to the stage.