Skip to content

EmitterParticle<DataType>

Default implementation of a particle used by the Emitter.

Extends

  • Particle

Type Parameters

DataType

DataType extends BaseParticleData = BaseParticleData

Type describing the particle data structure. Any custom data structure must extend BaseParticleData. Any custom data will also need to be manually reset, as the default particle will only reset the base data.

Implements

Constructors

Constructor

ts
new EmitterParticle<DataType>(data): EmitterParticle<DataType>;

Creates a new EmitterParticle instance.

Parameters

data

DataType

Particle data used by emitter behaviors.

Returns

EmitterParticle<DataType>

Overrides

ts
Particle.constructor;

Properties

data

ts
data: DataType;

Particle data used by emitter behaviors.

See

BaseParticleData for the structure of the data.

Implementation of

IEmitterParticle.data

Methods

onFetch()

ts
onFetch(): void;

Invoked when particle is fetched from pool.

Returns

void

Implementation of

IEmitterParticle.onFetch


onRecycle()

ts
onRecycle(): void;

Invoked when particle is returned to pool.

Returns

void

Implementation of

IEmitterParticle.onRecycle