Class: AnimationClip
Defined in: animations/types/AnimationClip.ts:13
Interface representing a group of animation frames for a specific animation name.
Constructors
Constructor
new AnimationClip(
frames):AnimationClip
Defined in: animations/types/AnimationClip.ts:43
Creates an instance of Animation.
Parameters
frames
The frames of the animation.
Returns
AnimationClip
Properties
frameCount
readonlyframeCount:number
Defined in: animations/types/AnimationClip.ts:22
The total number of frames in the animation.
frames
readonlyframes:AnimationFrame[]
Defined in: animations/types/AnimationClip.ts:17
The frames of the animation.
onAnimationEndEvent
readonlyonAnimationEndEvent:ForgeEvent
Defined in: animations/types/AnimationClip.ts:32
Event that is raised when the animation ends.
onAnimationFrameChangeEvent
readonlyonAnimationFrameChangeEvent:OnAnimationFrameChangeEvent
Defined in: animations/types/AnimationClip.ts:37
Event that is raised every frame change. This includes the first and last frame change of an animation
onAnimationStartEvent
readonlyonAnimationStartEvent:ForgeEvent
Defined in: animations/types/AnimationClip.ts:27
Event that is raised when the animation starts.
Methods
getFrame()
getFrame(
index):AnimationFrame
Defined in: animations/types/AnimationClip.ts:62
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.