Header menu logo Mibo

AnimatedModel Module

Pure update functions for AnimatedModel.

Mirrors the 2D AnimatedSprite module. Each function returns a new AnimatedModel. Playback delegates to Animation3DState; bone computation happens at draw time, not here.

Functions and values

Function or value Description

blendTo clipName duration am

Full Usage: blendTo clipName duration am

Parameters:
Returns: AnimatedModel

Start blending toward a target animation.

clipName : string
duration : float32
am : AnimatedModel
Returns: AnimatedModel

create model mesh clips clipName fps

Full Usage: create model mesh clips clipName fps

Parameters:
    model : Model - The MonoGame model (meshes/textures).
    mesh : AnimatedMesh voption - Shared skeleton data (ValueNone for a boneless model).
    clips : Animation3DClips - Shared animation clip set (from IAssets.ModelAnimations).
    clipName : string - The animation to start on (falls back to clip 0 if absent).
    fps : float32 - Playback speed in frames per second.

Returns: AnimatedModel

Create an animated model starting on the named clip.

model : Model

The MonoGame model (meshes/textures).

mesh : AnimatedMesh voption

Shared skeleton data (ValueNone for a boneless model).

clips : Animation3DClips

Shared animation clip set (from IAssets.ModelAnimations).

clipName : string

The animation to start on (falls back to clip 0 if absent).

fps : float32

Playback speed in frames per second.

Returns: AnimatedModel

currentClipName am

Full Usage: currentClipName am

Parameters:
Returns: string

Name of the current clip.

am : AnimatedModel
Returns: string

duration am

Full Usage: duration am

Parameters:
Returns: float32
Modifiers: inline

Total duration of the current clip in seconds at the current speed.

am : AnimatedModel
Returns: float32

isFinished am

Full Usage: isFinished am

Parameters:
Returns: bool
Modifiers: inline

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

am : AnimatedModel
Returns: bool

isPlaying clipName am

Full Usage: isPlaying clipName am

Parameters:
Returns: bool

Is currently playing the specified animation?

clipName : string
am : AnimatedModel
Returns: bool

play clipName am

Full Usage: play clipName am

Parameters:
Returns: AnimatedModel

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

clipName : string
am : AnimatedModel
Returns: AnimatedModel

playByIndex clipIndex am

Full Usage: playByIndex clipIndex am

Parameters:
Returns: AnimatedModel

Play by clip index (zero string allocation).

clipIndex : int
am : AnimatedModel
Returns: AnimatedModel

playIfNot clipName am

Full Usage: playIfNot clipName am

Parameters:
Returns: AnimatedModel

Play only if not already playing it.

clipName : string
am : AnimatedModel
Returns: AnimatedModel

restart am

Full Usage: restart am

Parameters:
Returns: AnimatedModel

Force restart the current animation.

am : AnimatedModel
Returns: AnimatedModel

update deltaSeconds am

Full Usage: update deltaSeconds am

Parameters:
Returns: AnimatedModel

Advance playback by delta seconds. Pure; returns a new state.

deltaSeconds : float32
am : AnimatedModel
Returns: AnimatedModel

withLoop loop am

Full Usage: withLoop loop am

Parameters:
Returns: AnimatedModel
Modifiers: inline

Set whether the current clip loops.

loop : bool
am : AnimatedModel
Returns: AnimatedModel

withSpeed speed am

Full Usage: withSpeed speed am

Parameters:
Returns: AnimatedModel
Modifiers: inline

Set the playback speed multiplier.

speed : float32
am : AnimatedModel
Returns: AnimatedModel

Type something to start searching.