@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
Properties
dispose()?
readonlyoptionaldispose: (data) =>void
Defined in: src/ecs/system.ts:104
The function to run when the system is disposed.
Parameters
data
The data for the disposal.
Returns
void
Inherited from
fixedUpdate()?
readonlyoptionalfixedUpdate: (data) =>void
Defined in: src/ecs/system.ts:90
The function to run on fixed updates.
Parameters
data
The data for the update.
Returns
void
Inherited from
keepOnClientSceneSwitch
readonlykeepOnClientSceneSwitch: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
readonlypriority: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
query
readonlyquery: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
queryKey
readonlyqueryKey: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
stateUpdate()?
readonlyoptionalstateUpdate: (data) =>void
Defined in: src/ecs/system.ts:97
The function to run on state updates.
Parameters
data
The data for the update.
Returns
void
Inherited from
type
readonlytype: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
Methods
runEveryNthCall()
protectedrunEveryNthCall<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
update()
update(
__namedParameters):void
Defined in: src/rendering/particles/emitterSystem.ts:19
The function to run on updates.
Parameters
__namedParameters
Returns
void
Overrides
System.update