Skip to content

RedGPU API v4.4.0-Alpha


RedGPU API / RedGPU / AnimState

Abstract Class: AnimState ​

Defined in: src/loader/gltf/animationLooper/AnimStateMachine.ts:15

Abstract class that serves as the base for animation states.

WARNING

This class is an abstract class, so you cannot create an instance directly.
Do not create an instance directly using the 'new' keyword.

Extended by ​

Constructors ​

Constructor ​

new AnimState(name): AnimState

Defined in: src/loader/gltf/animationLooper/AnimStateMachine.ts:35

Initializes an AnimState instance.

Parameters ​

ParameterTypeDescription
namestringAnimation state name

Returns ​

AnimState

Properties ​

name ​

name: string

Defined in: src/loader/gltf/animationLooper/AnimStateMachine.ts:20

Animation state name


startTime ​

startTime: number = 0

Defined in: src/loader/gltf/animationLooper/AnimStateMachine.ts:25

State entry start time (ms)

Methods ​

enter() ​

abstract enter(timestamp): void

Defined in: src/loader/gltf/animationLooper/AnimStateMachine.ts:47

Called when entering the state.

Parameters ​

ParameterTypeDescription
timestampnumberEntry timestamp (ms)

Returns ​

void


exit() ​

abstract exit(): void

Defined in: src/loader/gltf/animationLooper/AnimStateMachine.ts:66

Called when exiting the state.

Returns ​

void


update() ​

abstract update(deltaTime, timestamp): void

Defined in: src/loader/gltf/animationLooper/AnimStateMachine.ts:60

Called every frame while the state is active.

Parameters ​

ParameterTypeDescription
deltaTimenumberElapsed time between frames (ms)
timestampnumberCurrent frame timestamp (ms)

Returns ​

void