Animation3DState Module
Pure playback functions for Animation3DState.
Functions and values
| Function or value |
Description
|
Full Usage:
blendTo clipName duration state
Parameters:
string
-
The animation to blend towards.
duration : float32
-
The blend duration in seconds.
state : Animation3DState
Returns: Animation3DState
|
Start blending from the current animation to a target animation.
|
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 clips clipName fps
Parameters:
Animation3DClipsInfo
-
Clip metadata (names + keyframe counts).
clipName : string
-
The animation to start on (falls back to clip 0 if absent).
fps : float32
-
Playback speed in frames per second.
Returns: Animation3DState
|
Create a new animation state starting on the named clip.
|
Full Usage:
createByIndex clips clipIndex fps
Parameters:
Animation3DClipsInfo
clipIndex : int
fps : float32
Returns: Animation3DState
|
Create a new 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 update function each frame. This is pure clock logic — it does not compute bone matrices or mutate any model. The backend does that at render time using the updated indices and frames.
|
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 |
Set the playback speed multiplier.
|
Mibo