Header menu logo Mibo

Animation3DState Module

Functions and values

Function or value Description

applyToModel state

Full Usage: applyToModel state

Parameters:

Apply the current animation frame to the model's bone matrices.

Calls Raylib.UpdateModelAnimation (or UpdateModelAnimationEx when blending) which mutates the model's internal bone data. Must be called before rendering with DrawModel.

state : Animation3DState

blendTo clipName duration state

Full Usage: blendTo clipName duration state

Parameters:
    clipName : 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 UpdateModelAnimationEx. Once the blend completes, the target animation becomes the current animation.

clipName : string

The name of the animation to blend towards.

duration : float32

The blend duration in seconds.

state : Animation3DState

The current animation state.

Returns: Animation3DState

blendToByIndex clipIndex duration state

Full Usage: blendToByIndex clipIndex duration state

Parameters:
Returns: Animation3DState

Start blending to a target animation by clip index.

clipIndex : int
duration : float32
state : Animation3DState
Returns: Animation3DState

create model clips clipName fps

Full Usage: create model clips clipName fps

Parameters:
    model : 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.

model : 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

createByIndex model clips clipIndex fps

Full Usage: createByIndex model clips clipIndex fps

Parameters:
Returns: Animation3DState

Create a new 3D animation state starting on the specified clip index.

model : Model
clips : Animation3DClips
clipIndex : int
fps : float32
Returns: Animation3DState

currentClipName state

Full Usage: currentClipName state

Parameters:
Returns: string

Get the name of the current animation clip.

state : Animation3DState
Returns: string

duration state

Full Usage: duration state

Parameters:
Returns: float32
Modifiers: inline

Get the total duration of the current clip in seconds at the current speed.

state : Animation3DState
Returns: float32

isBlending state

Full Usage: isBlending state

Parameters:
Returns: bool
Modifiers: inline

Is currently blending between two animations?

state : Animation3DState
Returns: bool

isFinished state

Full Usage: isFinished state

Parameters:
Returns: bool
Modifiers: inline

Is the current animation finished? (always false for looping animations).

state : Animation3DState
Returns: bool

isPlaying clipName state

Full Usage: isPlaying clipName state

Parameters:
Returns: bool

Is currently playing the specified animation?

clipName : string
state : Animation3DState
Returns: bool

play clipName state

Full Usage: play clipName state

Parameters:
Returns: Animation3DState

Play an animation by name. Resets the frame if switching clips.

clipName : string
state : Animation3DState
Returns: Animation3DState

playByIndex clipIndex state

Full Usage: playByIndex clipIndex state

Parameters:
Returns: Animation3DState

Play by clip index (zero string allocation).

For maximum performance, resolve clip names to indices once at load time.

clipIndex : int
state : Animation3DState
Returns: Animation3DState

playIfNot clipName state

Full Usage: playIfNot clipName state

Parameters:
Returns: Animation3DState

Play animation only if not already playing it.

clipName : string
state : Animation3DState
Returns: Animation3DState

restart state

Full Usage: restart state

Parameters:
Returns: Animation3DState

Force restart the current animation from the beginning.

state : Animation3DState
Returns: Animation3DState

update deltaSeconds state

Full Usage: update deltaSeconds state

Parameters:
Returns: Animation3DState

Advance the animation by delta time.

Call from your Elmish update function each frame. Does not apply to the model — use applyToModel after.

deltaSeconds : float32
state : Animation3DState
Returns: Animation3DState

withLoop loop state

Full Usage: withLoop loop state

Parameters:
Returns: Animation3DState
Modifiers: inline
loop : bool
state : Animation3DState
Returns: Animation3DState

withSpeed speed state

Full Usage: withSpeed speed state

Parameters:
Returns: Animation3DState
Modifiers: inline
speed : float32
state : Animation3DState
Returns: Animation3DState

Type something to start searching.