Skip to main content

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​

AnimationFrame[]

The frames of the animation.

Returns​

AnimationClip

Properties​

frameCount​

readonly frameCount: number

Defined in: animations/types/AnimationClip.ts:22

The total number of frames in the animation.


frames​

readonly frames: AnimationFrame[]

Defined in: animations/types/AnimationClip.ts:17

The frames of the animation.


onAnimationEndEvent​

readonly onAnimationEndEvent: ForgeEvent

Defined in: animations/types/AnimationClip.ts:32

Event that is raised when the animation ends.


onAnimationFrameChangeEvent​

readonly onAnimationFrameChangeEvent: 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​

readonly onAnimationStartEvent: 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​

AnimationFrame

The requested AnimationFrame.