@pixi/3d
    Preparing search index...

    Type Alias ParticleSpawnValue<V>

    ParticleSpawnValue:
        | V
        | readonly [V, V]
        | ((rng: () => number, index: number) => V)

    A spawn() override: one value for the whole batch, a pair each particle draws between, or a function called per particle

    The function gets the system's random source and the particle's place in the batch, 0 to count - 1. A pair of points draws each component on its own, so two corners make a box.

    Type Parameters

    • V
    sparks.spawn(10, {
    life: 2,
    size: [0.1, 0.4],
    startRotation: (rng: () => number) => rng() * Math.PI * 2,
    });
    sparks.spawn(8, { position: (_rng: () => number, i: number) => ringPoints[i] });