babylon.quarks - v0.19.0
    Preparing search index...

    Interface IParticleSystem

    interface IParticleSystem {
        autoDestroy: boolean;
        duration: number;
        emissionState: EmissionState;
        emitter: IEmitter;
        emitterVelocity?: Vector3;
        isEmitEnded: boolean;
        looping: boolean;
        onlyUsedByOther?: boolean;
        particleNum: number;
        particles: IParticle[];
        paused: boolean;
        rendererEmitterSettings: RendererEmitterSettings;
        simulationResidual?: number;
        simulationStep?: number;
        store?: ParticleStore;
        worldSpace: boolean;
        addEventListener(
            event: ParticleSystemEventType,
            callback: (event: ParticleSystemEvent) => void,
        ): void;
        clone(): IParticleSystem;
        emit(delta: number, subEmissionState: EmissionState, matrix: Matrix4): void;
        endEmit(): void;
        hasPendingEmission(): boolean;
        isFinished(): boolean;
        pause(): void;
        play(): void;
        removeAllEventListeners(event: ParticleSystemEventType): void;
        removeEventListener(
            event: ParticleSystemEventType,
            callback: (event: ParticleSystemEvent) => void,
        ): void;
        restart(): void;
        stop(): void;
        toJSON(metaData: any, options: SerializationOptions): any;
    }

    Implemented by

    Index

    Properties

    autoDestroy: boolean

    Whether the ParticleSystem should be automatically disposed when it finishes emitting particles.

    duration: number

    Duration of the system.

    emissionState: EmissionState
    emitter: IEmitter

    Emitter for the particles.

    emitterVelocity?: Vector3

    World-space velocity of the emitter, updated each frame by the runtime.

    isEmitEnded: boolean

    True after endEmit() — emission window closed (non-looping duration elapsed).

    looping: boolean

    Whether the system is looping.

    onlyUsedByOther?: boolean

    Whether this system only emits through another system, which is when its particles carry their own parent transform.

    particleNum: number

    Number of particles.

    particles: IParticle[]

    Array of particles.

    paused: boolean
    rendererEmitterSettings: RendererEmitterSettings

    Optional renderer.

    simulationResidual?: number

    Wall-clock time that has passed since the last simulated step, in seconds, when the implementation simulates on a fixed timestep. Negative when that step ran a hair ahead of real time instead (rounded to the nearest step rather than floored, so this stays small either way). A renderer uses it to draw where the particles are now rather than where the last step left them.

    simulationStep?: number

    Length of one simulation step, in seconds, when the implementation simulates on a fixed timestep. Turning is recorded per step rather than per second, so a renderer needs this to know what fraction of a step simulationResidual is.

    Column storage backing the particles' vector attributes, when the implementation uses one. Rows [0, particleNum) hold the live particles in the same order as particles, so a renderer can read them as ranges.

    worldSpace: boolean

    Whether the system is in world space.

    Methods

    • Parameters

      Returns void

    • Returns void

    • Whether more particles can still spawn (bursts, rate, distance).

      Returns boolean

    • Non-looping system with no live particles and no pending emission.

      Returns boolean

    • Returns void

    • Returns void

    • Returns void

    • Returns void