Type Alias AnimationOptions<T>

AnimationOptions<T>: {
    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, progress): void
      • Parameters

        • properties: Record<keyof T, number>
        • progress: number

        Returns void

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

    interpolated properties