Skip to content

pixi-hm05 (player) / pixi-hm05 / ParticleEmitter

Class: ParticleEmitter ​

One emitter. update(t) = the picture at emitter time t (seconds). Local space: put it where the emitter is. World space: put it in the emitter's PARENT and pass poseAt (the emitter's matrix at any earlier time) — particles stay where they left it.

Extends ​

  • Container

Constructors ​

Constructor ​

ts
new ParticleEmitter(config, opts?): ParticleEmitter;

Parameters ​

ParameterType
configParticleConfig
opts?ParticleEmitterOptions

Returns ​

ParticleEmitter

Overrides ​

Container.constructor

Accessors ​

config ​

Get Signature ​

ts
get config(): ParticleConfig;
Returns ​

ParticleConfig

Set Signature ​

ts
set config(c): void;

a new configuration (texture choices are re-read; nothing else is kept)

Parameters ​
ParameterType
cParticleConfig
Returns ​

void


particleCount ​

Get Signature ​

ts
get particleCount(): number;

how many particles the last update drew

Returns ​

number

Methods ​

destroy() ​

ts
destroy(options?): void;

Removes all internal references and listeners as well as removes children from the display list. Do not use a Container after calling destroy.

Parameters ​

ParameterTypeDescription
options?DestroyOptionsOptions parameter. A boolean will act as if all options have been set to that value

Returns ​

void

Example ​

ts
container.destroy();
container.destroy(true);
container.destroy({ children: true });
container.destroy({ children: true, texture: true, textureSource: true });

Overrides ​

Container.destroy


update() ​

ts
update(t, poseAt?): void;

Parameters ​

ParameterType
tnumber
poseAt?EmitterPoseAt

Returns ​

void

HereSplash — 2D animation for the web