Skip to content

@emile/engine


@emile/engine / rendering/particles/emitterSystem / ParticleEmitterSystem

Class: ParticleEmitterSystem ​

Defined in: src/rendering/particles/emitterSystem.ts:12

ParticleEmitterSystem is responsible for updating ParticleEmitter components.

It handles the lifetime of the emitters and disables them when their lifetime expires.

Actual particle spawning and creation is handled by the ParticleSpriteCreator

Extends ​

Constructors ​

new ParticleEmitterSystem() ​

new ParticleEmitterSystem(): ParticleEmitterSystem

Defined in: src/rendering/particles/emitterSystem.ts:15

Returns ​

ParticleEmitterSystem

Overrides ​

System.constructor

Properties ​

dispose()? ​

readonly optional dispose: (data) => void

Defined in: src/ecs/system.ts:104

The function to run when the system is disposed.

Parameters ​

data ​

SystemUpdateData

The data for the disposal.

Returns ​

void

Inherited from ​

System.dispose


fixedUpdate()? ​

readonly optional fixedUpdate: (data) => void

Defined in: src/ecs/system.ts:90

The function to run on fixed updates.

Parameters ​

data ​

SystemUpdateData

The data for the update.

Returns ​

void

Inherited from ​

System.fixedUpdate


keepOnClientSceneSwitch ​

readonly keepOnClientSceneSwitch: boolean = false

Defined in: src/ecs/system.ts:60

Whether the system should be kept on the client side (not removed) when switching scenes.

This is useful for systems that need to persist across scene changes, such as the renderer, physics world and scene graph.

Inherited from ​

System.keepOnClientSceneSwitch


priority ​

readonly priority: number

Defined in: src/ecs/system.ts:44

The priority of the system.

Systems with a higher priority will run before systems with a lower priority.

Inherited from ​

System.priority


query ​

readonly query: EntityQuery

Defined in: src/ecs/system.ts:28

The query to match entities.

An empty query will match all entities.

This should not be changed after the system is created.

Inherited from ​

System.query


queryKey ​

readonly queryKey: string

Defined in: src/ecs/system.ts:37

The key of the query.

This is used internally by the registry.

Do not change this value.

Inherited from ​

System.queryKey


stateUpdate()? ​

readonly optional stateUpdate: (data) => void

Defined in: src/ecs/system.ts:97

The function to run on state updates.

Parameters ​

data ​

SystemUpdateData

The data for the update.

Returns ​

void

Inherited from ​

System.stateUpdate


type ​

readonly type: SystemType

Defined in: src/ecs/system.ts:53

The type of the system.

This should not be changed after the system is created.

Note ​

This is used to determine if the system should run on the client, server, or both.

Inherited from ​

System.type

Methods ​

runEveryNthCall() ​

protected runEveryNthCall<T>(n, callback): T

Defined in: src/ecs/system.ts:112

Runs a callback every nth call. This is useful for reducing the frequency of certain updates that don't need to run every frame, such as expensive calculations or updates that only need to happen periodically.

Type Parameters ​

T ​

T extends (...args) => void

Parameters ​

n ​

number

The nth time to execute the callback, 2 will execute the callback on every 2nd call

callback ​

T

The callback to execute

Returns ​

T

Inherited from ​

System.runEveryNthCall


update() ​

update(__namedParameters): void

Defined in: src/rendering/particles/emitterSystem.ts:19

The function to run on updates.

Parameters ​

__namedParameters ​

SystemUpdateData

Returns ​

void

Overrides ​

System.update