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

    Interface PhysicsOptions<T>

    interface PhysicsOptions<T> {
        add?: (a: T, b: T) => T;
        cancelKey?: string;
        damping?: number;
        from: 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 | null;
        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
    magnitude?: (v: T) => number
    mass?: number
    onDone?: () => void
    onTick: (value: T) => void
    restThreshold?: number
    scale?: (v: T, k: number) => T
    stiffness?: number
    subtract?: (a: T, b: T) => T
    to?: T | null

    Target. null ⇒ no spring force (decay-mode).

    velocity?: T

    Initial velocity in T-units per second.