konfeti - v0.6.0
    Preparing search index...

    Type Alias BuiltinPhysicsOptions

    Built-in Motion Physics Settings. Range values are sampled per particle, so pieces fall at slightly different rates. Horizontal terminal speed is wind / drag, vertical terminal speed is gravity / drag.

    type BuiltinPhysicsOptions = {
        attract?: boolean | AttractOptions;
        drag?: Range<PerSecond>;
        floor?: boolean | FloorOptions;
        gravity?: Range<PixelsPerSecondSquared>;
        swirl?: boolean | SwirlOptions;
        terminalVelocity?: PixelsPerSecond;
        wind?: Range<PixelsPerSecondSquared>;
    }
    Index
    attract?: boolean | AttractOptions

    Attractor / Repulsor. true pulls particles toward the pointer with the default strength, false disables it, an object sets the target (pointer, element or point), strength (negative pushes away), reach and falloff.

    false

    Konfeti.fire({ physics: { attract: true } });
    Konfeti.fire({ physics: { attract: { target: { x: 0.5, y: 0.2 }, strength: 1200 } } });

    Air Resistance. How quickly particles lose speed. 0 = no resistance, higher = shorter bursts and slower falling.

    3.5

    floor?: boolean | FloorOptions

    Floor Collision. true uses the canvas bottom with default bounce, false lets particles fall off-screen.

    false

    Downward Acceleration. Negative values make particles float upward.

    700

    swirl?: boolean | SwirlOptions

    Looping Drift. true uses the default swirl, false disables it, an object customizes it.

    false

    terminalVelocity?: PixelsPerSecond

    Speed Limit. Caps the total speed of every particle. Infinity disables the cap.

    Infinity

    Horizontal Acceleration. Positive pushes right, negative pushes left.

    0