Class for animation handling

Param

Delta time from start of animation

Param

Array of Eases animation functions

Param

Queue of future animations

Param

Function for handling of interframe modification

Param

Animation duration in milliseconds

Param

Ease animation function factory

Hierarchy

  • Animation

Properties

delta: number = 0
duration: number
eases: Ease[]
easing: AnimationEasing = AnimationEasings.linear
nextAnimations: Animation[] = ...
values: [number, number][]

Methods

  • Remove all listeners from All Animation End Event

    Returns

    Object itself for fluent interface

    Returns Animation

  • Remove all listeners from Animation End Event

    Returns

    Object itself for fluent interface

    Returns Animation

  • Remove all listeners from Every Animation End Event

    Returns

    Object itself for fluent interface

    Returns Animation

  • Finish current animation and start the next one on the sequence

    Returns

    Future animations or undefined

    Parameters

    • emitEvents: boolean = true

      Flag that tells whether the function should emit any events

    Returns undefined | Animation

  • Finish all animations

    Parameters

    • emitEvents: boolean = true

      Flag that tells whether the function should emit any events

    Returns void

  • Get final value of queued animations

    Returns

    Final values of the animations

    Returns number[]

  • Get time until all queued animations will finish

    Returns number

  • Get is animation over and there are no queued animations

    Returns boolean

  • Remove a listener from All Animation End Event

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of the listener

    Returns boolean

  • Remove a listener from Animation End Event

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of the listener

    Returns boolean

  • Remove a listener from Every Animation End Event

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of the listener

    Returns boolean

  • Subscribe on all subsequent animations end event

    Returns

    Token of the event listener

    Parameters

    • action: VoidFunction

      Event listener

    • Optional token: Token

    Returns Token

  • Subscribe on current animation end event

    Returns

    Token of the event listener

    Parameters

    • action: ((nextAnimation?: Animation) => void)

      Event listener

        • (nextAnimation?: Animation): void
        • Parameters

          Returns void

    • Optional token: Token

    Returns Token

  • Subscribe on current animation start event

    Returns

    Token of the event listener

    Parameters

    • action: (() => void)

      Event listener

        • (): void
        • Returns void

    • Optional token: Token

    Returns Token

  • Subscribe on every subsequent animations end event

    Returns

    Token of the event listener

    Parameters

    • action: ((nextAnimation?: Animation) => void)

      Event listener

        • (nextAnimation?: Animation): void
        • Parameters

          Returns void

    • Optional token: Token

    Returns Token

  • Starts an animation

    Returns

    Object itself for fluent interface

    Returns Animation