@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / index / AnimationStateManager
Class: AnimationStateManager ​
Defined in: AnimationStateMachine.ts:107
Constructors ​
Constructor ​
new AnimationStateManager(): AnimationStateManager;Returns ​
AnimationStateManager
Methods ​
addState() ​
addState(state): AnimationStateMachine;Defined in: AnimationStateMachine.ts:111
Parameters ​
| Parameter | Type |
|---|---|
state | AnimationStateMachine |
Returns ​
createState() ​
createState(
name,
clip,
callbacks?,
loop?,
clipId?): AnimationStateMachine;Defined in: AnimationStateMachine.ts:116
Parameters ​
| Parameter | Type | Default value |
|---|---|---|
name | string | undefined |
clip | AnimationClip | undefined |
callbacks | AnimationStateCallbacks | {} |
loop | boolean | false |
clipId | string | null | null |
Returns ​
removeState() ​
removeState(name): boolean;Defined in: AnimationStateMachine.ts:128
Parameters ​
| Parameter | Type |
|---|---|
name | string |
Returns ​
boolean
getState() ​
getState(name): AnimationStateMachine | null;Defined in: AnimationStateMachine.ts:142
Parameters ​
| Parameter | Type |
|---|---|
name | string |
Returns ​
AnimationStateMachine | null
hasState() ​
hasState(name): boolean;Defined in: AnimationStateMachine.ts:146
Parameters ​
| Parameter | Type |
|---|---|
name | string |
Returns ​
boolean
listStates() ​
listStates(): AnimationStateMachine[];Defined in: AnimationStateMachine.ts:150
Returns ​
getActiveState() ​
getActiveState(): AnimationStateMachine | null;Defined in: AnimationStateMachine.ts:154
Returns ​
AnimationStateMachine | null
switchState() ​
switchState(name, autoPlay?): AnimationStateMachine | null;Defined in: AnimationStateMachine.ts:158
Parameters ​
| Parameter | Type | Default value |
|---|---|---|
name | string | undefined |
autoPlay | boolean | true |
Returns ​
AnimationStateMachine | null
playState() ​
playState(name?): boolean;Defined in: AnimationStateMachine.ts:176
Parameters ​
| Parameter | Type |
|---|---|
name? | string |
Returns ​
boolean
pauseState() ​
pauseState(name?): boolean;Defined in: AnimationStateMachine.ts:187
Parameters ​
| Parameter | Type |
|---|---|
name? | string |
Returns ​
boolean
stopState() ​
stopState(name?): boolean;Defined in: AnimationStateMachine.ts:197
Parameters ​
| Parameter | Type |
|---|---|
name? | string |
Returns ​
boolean
clear() ​
clear(): void;Defined in: AnimationStateMachine.ts:210
Returns ​
void

