Interface ContinuousOpts<T>
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 };
}
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
Properties
apply
Realize target (already unwrapped, absolute) onto the sources,
given the current unwrapped reading (for a delta).
period
period: number
Cycle length: 2π for a full angle, π for an axis (sign-free).
raw
Raw cyclic reading. defined: false (e.g. a collapsed cloud has no
axis) holds the last emitted value and freezes the sources.
Options for continuous.
rawreads the cyclic value (modperiod) and whether it's defined;applyrealizes an unwrapped target back onto the sources given the current unwrapped reading.