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
Props
Name | Description |
---|---|
autoResize false | boolean If true, container allocates more batches in case there are more than maxSize particles. |
batchSize 16384 | number Number of particles per batch. If less than maxSize, it uses maxSize instead. |
instance | PIXI.ParticleContainer The PIXI.ParticleContainer instance. Can be set or bound to. |
maxSize 1500 | number The maximum number of particles that can be rendered by the container. Affects size of allocated buffers. |
properties | PIXI.IParticleProperties The properties of children that should be uploaded to the gpu and applied. |
Additional props are passed on to Container
Slots
Name | Props | Fallback |
---|---|---|
default | {} |
Events
Name | Type | Detail |
---|---|---|
added | forwarded | |
click | forwarded | |
create | forwarded | |
globalmousemove | forwarded | |
globalpointermove | forwarded | |
globaltouchmove | forwarded | |
mousedown | forwarded | |
mousemove | forwarded | |
mouseout | forwarded | |
mouseover | forwarded | |
mouseup | forwarded | |
mouseupoutside | forwarded | |
pointercancel | forwarded | |
pointerdown | forwarded | |
pointermove | forwarded | |
pointerout | forwarded | |
pointerover | forwarded | |
pointertap | forwarded | |
pointerup | forwarded | |
pointerupoutside | forwarded | |
removed | forwarded | |
removedFrom | forwarded | |
rightclick | forwarded | |
rightdown | forwarded | |
rightup | forwarded | |
rightupoutside | forwarded | |
tap | forwarded | |
touchcancel | forwarded | |
touchend | forwarded | |
touchendoutside | forwarded | |
touchmove | forwarded | |
touchstart | forwarded |