Type Alias AnimationOptions<T>

AnimationOptions: {
    delay?: number;
    duration: number;
    easing?: string | (t: number) => number;
    onTick: (properties: Record<keyof T, number>, progress: number) => void;
    properties: Partial<Record<keyof T, { end: number; start: number }>>;
}

Options for Animation

Type Parameters

  • T

Type declaration

  • Optionaldelay?: number

    delay before start

    0
    
  • duration: number

    duration of the animation

  • Optionaleasing?: string | (t: number) => number

    interpoaltion function, see CONSTANTS.EASINGS

    'linear'
    
  • onTick: (properties: Record<keyof T, number>, progress: number) => void

    function called for each frame

  • properties: Partial<Record<keyof T, { end: number; start: number }>>

    interpolated properties