Skip to content

ParticleContainer

Creates a ParticleContainer

A really fast version of the Container built solely for speed, so use when you need a lot of sprites or particles.

The tradeoff of the ParticleContainer is that most advanced functionality will not work. ParticleContainer implements the basic object transform (position, scale, rotation) and some advanced functionality like tint.

Other more advanced functionality like masking, filters, etc will not work on sprites in this batch.

Usage

Note: when working with thousands of components, it is much more performant to create & update the Pixi instances directly instead of through components

API

ParticleContainer Attributes

NameTypeDefaultDescription
blend-modeBLEND_MODES.NORMALThe blend mode to be applied to the sprite.
auto-resizebooleanfalseIf true, container will automatically calculate and resize its bounds to include all children.
max-sizenumber1500The maximum number of particles that can be drawn by the container.
propertiesobjectundefinedThe properties of children that should be uploaded to the gpu and applied.

more props in Container Props and PIXI.ParticleContainer

ParticleContainer Events

NameTypeDescription
renderfunctioncustom render function

more events in Container Events