Animation3DState Module
Functions and values
| Function or value |
Description
|
|
Apply the current animation frame to the model's bone matrices.
Calls
|
Full Usage:
blendTo clipName duration state
Parameters:
string
-
The name of the animation to blend towards.
duration : float32
-
The blend duration in seconds.
state : Animation3DState
-
The current animation state.
Returns: Animation3DState
|
Start blending from the current animation to a target animation.
During the blend, both animations play simultaneously and their bone transforms
are interpolated using
|
Full Usage:
blendToByIndex clipIndex duration state
Parameters:
int
duration : float32
state : Animation3DState
Returns: Animation3DState
|
Start blending to a target animation by clip index.
|
Full Usage:
create model clips clipName fps
Parameters:
Model
-
The model to animate. Must be a unique instance per entity.
clips : Animation3DClips
-
The loaded animation clip set.
clipName : string
-
The name of the animation to start on.
fps : float32
-
The animation playback speed in frames per second.
Returns: Animation3DState
|
Create a new 3D animation state starting on the specified clip.
|
Full Usage:
createByIndex model clips clipIndex fps
Parameters:
Model
clips : Animation3DClips
clipIndex : int
fps : float32
Returns: Animation3DState
|
Create a new 3D animation state starting on the specified clip index.
|
|
|
|
Get the total duration of the current clip in seconds at the current speed.
|
|
|
|
Is the current animation finished? (always false for looping animations).
|
Full Usage:
isPlaying clipName state
Parameters:
string
state : Animation3DState
Returns: bool
|
Is currently playing the specified animation?
|
Full Usage:
play clipName state
Parameters:
string
state : Animation3DState
Returns: Animation3DState
|
Play an animation by name. Resets the frame if switching clips.
|
Full Usage:
playByIndex clipIndex state
Parameters:
int
state : Animation3DState
Returns: Animation3DState
|
Play by clip index (zero string allocation). For maximum performance, resolve clip names to indices once at load time.
|
Full Usage:
playIfNot clipName state
Parameters:
string
state : Animation3DState
Returns: Animation3DState
|
Play animation only if not already playing it.
|
|
Force restart the current animation from the beginning.
|
Full Usage:
update deltaSeconds state
Parameters:
float32
state : Animation3DState
Returns: Animation3DState
|
Advance the animation by delta time.
Call from your Elmish update function each frame. Does not apply to the model — use
|
Full Usage:
withLoop loop state
Parameters:
bool
state : Animation3DState
Returns: Animation3DState
Modifiers: inline |
|
Full Usage:
withSpeed speed state
Parameters:
float32
state : Animation3DState
Returns: Animation3DState
Modifiers: inline |
|
Mibo