Class: AnimationClip
Defined in: animations/types/AnimationClip.ts:20
Interface representing a group of animation frames for a specific animation name.
Constructors
Constructor
new AnimationClip(
name,frames,playbackSpeed):AnimationClip
Defined in: animations/types/AnimationClip.ts:54
Creates an instance of Animation.
Parameters
name
string
The name of the animation.
frames
The frames of the animation.
playbackSpeed
number = 1
The speed multiplier for the animation playback. Defaults to 1.
Returns
AnimationClip
Properties
frames
readonlyframes:AnimationFrame[]
Defined in: animations/types/AnimationClip.ts:29
The frames of the animation.
name
readonlyname:string
Defined in: animations/types/AnimationClip.ts:24
The name of this animation.
onAnimationEndEvent
readonlyonAnimationEndEvent:OnAnimationChangeEvent
Defined in: animations/types/AnimationClip.ts:39
Event that is raised when the animation ends.
onAnimationFrameChangeEvent
readonlyonAnimationFrameChangeEvent:OnAnimationFrameChangeEvent
Defined in: animations/types/AnimationClip.ts:44
Event that is raised every frame change. This includes the first and last frame change of an animation
onAnimationStartEvent
readonlyonAnimationStartEvent:OnAnimationChangeEvent
Defined in: animations/types/AnimationClip.ts:34
Event that is raised when the animation starts.
playbackSpeed
playbackSpeed:
number
Defined in: animations/types/AnimationClip.ts:46
Methods
getFrame()
getFrame(
index):AnimationFrame
Defined in: animations/types/AnimationClip.ts:84
Gets a specific frame of the animation, looping if the index exceeds the number of frames.
Parameters
index
number
The index of the frame to retrieve.
Returns
The requested AnimationFrame.