API

Class AnimationEvent

Composed of a frame, and an action function

Index
  • Initializes the animation event

    Parameters

    • frame: number

      The frame for which the event is triggered

    • action: (currentFrame: number) => void

      The event to perform when triggered

    • OptionalonlyOnce: boolean

      Specifies if the event should be triggered only once

    Returns AnimationEvent

action: (currentFrame: number) => void

The event to perform when triggered *

frame: number

The frame for which the event is triggered *

isDone: boolean = false

Specifies if the animation event is done

onlyOnce?: boolean

Specifies if the event should be triggered only once*