Header menu logo Mibo

Animation3DState Module

Functions and values

Function or value Description

blendTo clipName duration state

Full Usage: blendTo clipName duration state

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

clipName : string

The animation to blend towards.

duration : float32

The blend duration in seconds.

state : Animation3DState
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

computeBonePalette mesh state

Full Usage: computeBonePalette mesh state

Parameters:
Returns: Matrix[]

Compute the bone matrix palette for the current animation frame.

This is the MonoGame analog of raylib's UpdateModelAnimation. Instead of mutating the model, it returns a Matrix[] the caller passes to Draw3D.drawSkinnedMesh. Each entry is InverseBindPose[i] * currentPoseMatrix — the standard skinning palette. When blending, the two clips' bone matrices are linearly interpolated by BlendProgress.

mesh : AnimatedMesh
state : Animation3DState
Returns: Matrix[]

create clips clipName fps

Full Usage: create clips clipName fps

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

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 clips clipIndex fps

Full Usage: createByIndex clips clipIndex fps

Parameters:
Returns: Animation3DState

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

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).

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 compute bone matrices — use computeBonePalette 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.