weasel API - v0.8.0
    Preparing search index...

    Interface SpringOptions<T>

    interface SpringOptions<T> {
        add?: (a: T, b: T) => T;
        cancelKey?: string;
        damping?: number;
        from: T;
        interpolate?: Interpolate<T>;
        magnitude?: (v: T) => number;
        mass?: number;
        onDone?: () => void;
        onTick: (value: T) => void;
        preset?: SpringPresetName;
        restThreshold?: number;
        scale?: (v: T, k: number) => T;
        stiffness?: number;
        subtract?: (a: T, b: T) => T;
        to: T;
        velocity?: T;
    }

    Type Parameters

    • T
    Index

    Properties

    add?: (a: T, b: T) => T

    Vector helpers — required for non-numeric T.

    cancelKey?: string
    damping?: number
    from: T
    interpolate?: Interpolate<T>
    magnitude?: (v: T) => number
    mass?: number
    onDone?: () => void
    onTick: (value: T) => void
    restThreshold?: number

    Velocity magnitude below which the spring is considered settled. Default 0.01.

    scale?: (v: T, k: number) => T
    stiffness?: number
    subtract?: (a: T, b: T) => T
    to: T
    velocity?: T

    Initial velocity in T-units per second. Default: zero (T-shape-aware).