konfeti - v0.6.0
    Preparing search index...

    Type Alias EmitOptions

    EmitOptions: Omit<
        FireOptions,
        "particleCount"
        | "origin"
        | "emission"
        | "formation",
    > & { follow?: EmitterTarget; rate: number }

    Continuous Emitter Options. Everything fire() accepts (shapes, paper, physics, hooks …) except the settings a stream replaces: particleCount becomes rate, origin becomes follow, and emission is always continuous. A stream cannot form a shape, so formation is not available either.

    Type Declaration

    • Optional Readonlyfollow?: EmitterTarget

      Emission Point. An element, "pointer" or a normalized point; change it later with emitter.moveTo().

      { x: 0.5, y: 0.6 } (the same point fire() uses)

    • Readonlyrate: number

      Emission Rate. How many particles leave the emitter per second, spread evenly over time. Must be a positive, finite number; the instance's maxParticles still caps the total on screen.

      Unit: particles per second.

      Konfeti.emit({ rate: 25 }); // a gentle fountain
      
    const trail = Konfeti.emit({
    rate: 40,
    follow: "pointer",
    spread: 360,
    startVelocity: [50, 150],
    shapes: [{ type: "star", size: [8, 12] }],
    });
    trail.stop(); // stop emitting; the particles already out finish their lives