Skip to content

UpdateBehavior<DataType, ParticleType>

Interface defining behaviors which update particles on each update cycle.

Extends

Type Parameters

DataType

DataType extends BaseParticleData = BaseParticleData

Type describing the data object stored on particles.

ParticleType

ParticleType extends IEmitterParticle<DataType> = IEmitterParticle<DataType>

Type describing the particle used within the emitter.

Accessors

updateOrder

Get Signature

ts
get abstract updateOrder(): BehaviorOrder;

Defines at which step of the update cycle the behavior is applied.

  • initial: Earliest step, useful when other behaviors depend on this behavior.
  • normal: Default step for most behaviors.
  • late: Latest step, useful for behaviors that should override others or depend on their properties.
Returns

BehaviorOrder

Inherited from

EmitterBehavior.updateOrder

Methods

applyConfig()

ts
applyConfig(config): void;

Reset the behavior and apply the provided configuration.

Parameters

config

unknown

Behavior configuration.

Returns

void

Inherited from

EmitterBehavior.applyConfig


getConfig()

ts
abstract getConfig(): unknown;

Retrieve the current behavior properties as a configuration object. If the behavior is inactive, undefined is returned.

Returns

unknown

Behavior configuration object or undefined if inactive.

Inherited from

EmitterBehavior.getConfig


reset()

ts
abstract protected reset(): void;

Reset the behavior to its default state.

Returns

void

Inherited from

EmitterBehavior.reset


update()

ts
update(particle, deltaTime): void;

Updates the particle.

Parameters

particle

ParticleType

Particle to update.

deltaTime

number

Time elapsed since the last update, in seconds.

Returns

void