mwg API
    Preparing search index...

    Interface ParticleEmitterOptions

    interface ParticleEmitterOptions {
        alpha?: readonly [number, number] | ParticleCurve;
        angle?: ParticleRange;
        flicker?: number;
        frames?: readonly Texture<TextureSource<any>>[];
        gravity?: { x: number; y: number };
        life?: ParticleRange;
        max?: number;
        rate?: number;
        scale?: readonly [number, number] | ParticleCurve;
        spawn?: ParticleSpawnArea;
        speed?: ParticleRange;
        spin?: ParticleRange;
        texture?: Texture<TextureSource<any>>;
        tint?: ParticleRange;
    }
    Index
    alpha?: readonly [number, number] | ParticleCurve

    alpha at birth and at death, or a curve of the particle's age - see scale

    emission direction in radians; the default sprays in every direction

    flicker?: number

    A per-frame wobble on the scale, between 0 and 1: each frame every particle's scale is multiplied by a seeded draw in [1 - flicker, 1], so a flame's size jumps instead of sliding. 1 lets it drop to nothing, which with a scale curve of (t) => 1 - t is a torch spark. Dropped under reduced motion, like the travel and the spin.

    frames?: readonly Texture<TextureSource<any>>[]

    A texture sequence each particle walks across its own life - the four frames of a flame, the puff of smoke - taken in preference to texture, whose place it takes. Chosen by the particle's age rather than the emitter's, so a burst does not flick through the frames in lockstep.

    gravity?: { x: number; y: number }

    constant acceleration, world units per second squared - the default falls nowhere

    seconds a particle lives

    max?: number

    how many particles can live at once. The pool is allocated once at this size and never grows

    rate?: number

    particles emitted per second while start()ed; 0 makes the emitter burst-only

    scale?: readonly [number, number] | ParticleCurve

    scale at birth and at death, interpolated across a particle's life, or a curve of it

    spawn?: ParticleSpawnArea

    where in local space particles are born; without one they all start at the origin

    initial speed, world units per second

    rotation change in radians per second

    texture?: Texture<TextureSource<any>>

    drawn per particle; omit for a pure simulation that renders nothing (tests, headless)

    Multiplied into every particle sprite, either one colour for the whole emitter or a [from, to] pair each particle draws its own colour from, channel by channel - water with a depth to it rather than one flat tint. Ignored without a texture.