Interface ContinuousOpts<T>

    Options for continuous. raw reads the cyclic value (mod period) and whether it's defined; apply realizes an unwrapped target back onto the sources given the current unwrapped reading.

    interface ContinuousOpts<T> {
        apply: (
            target: number,
            vals: readonly T[],
            current: number,
        ) => readonly (typeof SKIP | T)[];
        period: number;
        raw: (vals: readonly T[]) => { defined: boolean; value: number };
    }

    Type Parameters

    • T
    Index

    Properties

    Properties

    apply: (
        target: number,
        vals: readonly T[],
        current: number,
    ) => readonly (typeof SKIP | T)[]

    Realize target (already unwrapped, absolute) onto the sources, given the current unwrapped reading (for a delta).

    period: number

    Cycle length: for a full angle, π for an axis (sign-free).

    raw: (vals: readonly T[]) => { defined: boolean; value: number }

    Raw cyclic reading. defined: false (e.g. a collapsed cloud has no axis) holds the last emitted value and freezes the sources.