UNPKG

@thi.ng/ramp

Version:

Extensible keyframe interpolation/tweening of arbitrary, nested types

24 lines 887 B
import type { Vec } from "@thi.ng/vectors"; import type { Frame, RampImpl, RampOpts, VecAPI } from "./api.js"; import { Ramp } from "./ramp.js"; /** * Syntax sugar for creating a numeric {@link Ramp} using the {@link LINEAR_N} * ramp linear interpolation impl and given stops (aka keyframes, minimum 2 * required). * * @remarks * For vector-valued linear ramps, use {@link ramp} with {@link LINEAR_V}. * * @param stops * @param opts */ export declare const linear: (stops: Frame<number>[], opts?: Partial<RampOpts>) => Ramp<number>; export declare const LINEAR_N: RampImpl<number>; /** * Vector version of {@link LINEAR_N}. Use with any of the supplied vector APIs: * {@link VEC} (arbitrary size), {@link VEC2}, {@link VEC3} or {@link VEC4}. * * @param vec */ export declare const LINEAR_V: <T extends Vec>(vec: VecAPI) => RampImpl<T>; //# sourceMappingURL=linear.d.ts.map