Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / AnimationStateMachine

Class: AnimationStateMachine ​

Defined in: AnimationStateMachine.ts:24

Implements ​

Constructors ​

Constructor ​

ts
new AnimationStateMachine(
   name, 
   clip, 
   callbacks?, 
   loop?, 
   clipId?): AnimationStateMachine;

Defined in: AnimationStateMachine.ts:33

Parameters ​

ParameterTypeDefault value
namestringundefined
clipAnimationClipundefined
callbacksAnimationStateCallbacks{}
loopbooleanfalse
clipIdstring | nullnull

Returns ​

AnimationStateMachine

Properties ​

PropertyTypeDefault valueDefined in
namestringundefinedAnimationStateMachine.ts:25
clipAnimationClipundefinedAnimationStateMachine.ts:26
clipIdstring | nullundefinedAnimationStateMachine.ts:27
loopbooleanundefinedAnimationStateMachine.ts:28
isPlayingbooleanfalseAnimationStateMachine.ts:29
isPausedbooleanfalseAnimationStateMachine.ts:30

Methods ​

setCallbacks() ​

ts
setCallbacks(callbacks): void;

Defined in: AnimationStateMachine.ts:51

Parameters ​

ParameterType
callbacksAnimationStateCallbacks

Returns ​

void


setLoop() ​

ts
setLoop(loop): void;

Defined in: AnimationStateMachine.ts:59

Parameters ​

ParameterType
loopboolean

Returns ​

void


onStart() ​

ts
onStart(): void;

Defined in: AnimationStateMachine.ts:63

Returns ​

void

Implementation of ​

StateMachine.onStart


onPlaying() ​

ts
onPlaying(): void;

Defined in: AnimationStateMachine.ts:67

Returns ​

void

Implementation of ​

StateMachine.onPlaying


onEnd() ​

ts
onEnd(): void;

Defined in: AnimationStateMachine.ts:71

Returns ​

void

Implementation of ​

StateMachine.onEnd


play() ​

ts
play(): void;

Defined in: AnimationStateMachine.ts:75

Returns ​

void

Implementation of ​

StateMachine.play


pause() ​

ts
pause(): void;

Defined in: AnimationStateMachine.ts:87

Returns ​

void

Implementation of ​

StateMachine.pause


stop() ​

ts
stop(): void;

Defined in: AnimationStateMachine.ts:96

Returns ​

void

Implementation of ​

StateMachine.stop