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

    Interface TweenOptions<T>

    interface TweenOptions<T> {
        cancelKey?: string;
        easing?: EasingFn;
        from: T;
        interpolate?: Interpolate<T>;
        interpolator?: InterpolatorFactory<T>;
        ms: number;
        onDone?: () => void;
        onTick: (value: T) => void;
        to: T;
    }

    Type Parameters

    • T
    Index

    Properties

    cancelKey?: string

    Any new animation passed the same cancelKey cancels the prior one in flight.

    easing?: EasingFn
    from: T
    interpolate?: Interpolate<T>

    Required when T is not number. For T = number, defaults to linear numeric lerp. Called per-tick with (from, to, t). For interpolators with expensive setup, prefer interpolator which is built once at tween start.

    interpolator?: InterpolatorFactory<T>

    Factory interpolator built once at tween start. Takes precedence over interpolate when both are provided. Use this for d3-interpolate or any (from, to) => (t) => v shape.

    ms: number
    onDone?: () => void
    onTick: (value: T) => void
    to: T