konfeti - v0.6.0
    Preparing search index...

    Type Alias WorkerEmitOptions

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

    Worker-Safe Continuous Emitter Options. The worker version of EmitOptions: every worker-safe fire setting plus rate and follow. What the emitter follows is measured on the main thread and sent to the worker.

    Type Declaration

    • Optional Readonlyfollow?: EmitterTarget

      Emission Point: an element, "pointer" or a normalized point.

      { x: 0.5, y: 0.6 }

    • Readonlyrate: number

      Emission Rate. Particles per second; must be a positive, finite number.

      Unit: particles per second.

    const stage = createWorker(canvas);
    const trail = stage.emit({ rate: 80, follow: "pointer", spread: 360 });