API

Interface ParticleSystem

Pure-state data-oriented particle system. Behaviour is provided by the standalone functions below.

interface ParticleSystem {
    blendMode: number;
    buffer: ParticleBuffer;
    createAngle: ParticleStep | null;
    createColor: ParticleStep | null;
    createColorDead: ParticleStep | null;
    createDirection: ParticleStep | null;
    createEmitPower: ParticleStep | null;
    createLifeTime: ParticleStep | null;
    createPosition: ParticleStep | null;
    createSize: ParticleStep | null;
    emitRate: number;
    targetStopDuration: number;
    texture: Texture2D | null;
    updateSpeed: number;
    updateSteps: ParticleStep[];
}
Index
blendMode: number

Rendering blend mode (Babylon.js BaseParticleSystem blend constants).

buffer: ParticleBuffer
createAngle: ParticleStep | null
createColor: ParticleStep | null
createColorDead: ParticleStep | null
createDirection: ParticleStep | null
createEmitPower: ParticleStep | null
createLifeTime: ParticleStep | null

Creation slots, run in Babylon.js fixed order on every spawned particle (null slots skipped).

createPosition: ParticleStep | null
createSize: ParticleStep | null
emitRate: number

Particles emitted per simulated time unit.

targetStopDuration: number

When non-zero, the system stops once _actualFrame reaches this value.

texture: Texture2D | null

Particle texture, bound after the build's async loads settle (null until then / for headless builds).

updateSpeed: number

Simulation advance per frame, before the per-step ratio.

updateSteps: ParticleStep[]

Update steps, run in graph order on every live particle each frame.