Class AnimationEvent
Constructors
constructor
-
new AnimationEvent(
frame: number,
action: (currentFrame: number) => void,
onlyOnce?: boolean,
): AnimationEventInitializes 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: booleanSpecifies if the event should be triggered only once
Returns AnimationEvent
- frame: number
Properties
action
action: (currentFrame: number) => void
The event to perform when triggered *
frame
frame: number
The frame for which the event is triggered *
is Done
isDone: boolean = false
Specifies if the animation event is done
Optionalonly Once
onlyOnce?: boolean
Specifies if the event should be triggered only once*
Composed of a frame, and an action function