Racehorse
    Preparing search index...

    Function runAnimation

    • Runs the animation frames and triggers corresponding handler callbacks.

      Type Parameters

      Parameters

      • animation: T

        The animation to run.

      • handler:
            | Partial<AnimationHandler<T>>
            | ((animation: T, fraction: number, percent: number) => void)

        The handler that is triggered when the animation state changes.

        • Partial<AnimationHandler<T>>
        • (animation: T, fraction: number, percent: number) => void
            • (animation: T, fraction: number, percent: number): void
            • Triggered when an animated value is changed.

              Parameters

              • animation: T

                The pending animation.

              • fraction: number

                The result of Animation.easing applied to percent.

              • percent: number

                The completed animation percentage [0, 1].

              Returns void

      • Optionalsignal: AbortSignal

        The signal that cancels the animation.

      Returns void