Skip to content

ParticleSystem

Defined in: particles/src/ParticleSystem.ts:19

System that drives all ParticleEmitterComponents each frame. Runs in LateUpdate so it reads the frame’s final Transform: component updates have already moved their entities, so an emitter’s container and its new particles land where the entity is drawn this frame, not where it was last frame.

  • System

new ParticleSystem(): ParticleSystem

ParticleSystem

System.constructor

protected context: EngineContext

Defined in: core/dist/index.d.ts:1336

Reference to the engine context, set on registration.

System.context


enabled: boolean

Defined in: core/dist/index.d.ts:1334

Whether this system is active.

System.enabled


readonly phase: LateUpdate = Phase.LateUpdate

Defined in: particles/src/ParticleSystem.ts:21

The phase this system runs in.

System.phase


readonly priority: 0 = 0

Defined in: particles/src/ParticleSystem.ts:22

Execution priority within the phase. Lower = earlier. Default: 0.

System.priority

_setContext(context): void

Defined in: core/dist/index.d.ts:1343

Internal

Set the engine context. Called by SystemScheduler when the system is registered.

EngineContext

void

System._setContext


onRegister(context): void

Defined in: particles/src/ParticleSystem.ts:26

Called once when the system is registered with the engine.

EngineContext

void

System.onRegister


optional onUnregister(): void

Defined in: core/dist/index.d.ts:1351

Called when the system is removed.

void

System.onUnregister


update(dt): void

Defined in: particles/src/ParticleSystem.ts:32

Called every frame (or every fixed step for FixedUpdate).

number

void

System.update


protected use<T>(key): T

Defined in: core/dist/index.d.ts:1345

Resolve a service by key, cached after first lookup.

T

ServiceKey<T>

T

System.use

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/particles.md.