konfeti - v0.6.0
    Preparing search index...

    Type Alias BurstHooks

    Burst Lifecycle Hooks.

    Konfeti.fire({
    onParticleDeath: (p) => sparkAt(p.x, p.y),
    onComplete: () => console.log("done"),
    });
    type BurstHooks = {
        onComplete?: () => void;
        onParticleDeath?: (particle: ParticleState) => void;
        onParticleSpawn?: (particle: ParticleState) => void;
        onParticleUpdate?: (particle: MutableParticle, dt: number) => void;
        onStart?: () => void;
    }
    Index
    onComplete?: () => void

    Complete Callback. Called when emission has ended and every particle is gone (also after stop()).

    onParticleDeath?: (particle: ParticleState) => void

    Particle Death Callback. Called before the particle returns to the pool; do not keep the reference.

    onParticleSpawn?: (particle: ParticleState) => void

    Particle Spawn Callback.

    onParticleUpdate?: (particle: MutableParticle, dt: number) => void

    Particle Update Callback. Called for every live particle every frame, after physics.

    Runs in the hot path — keep it allocation-free.

    onStart?: () => void

    Start Callback. Called once, right after the first particles spawn.