Skip to main content

Module animation

Module animation 

Source
Expand description

The machine a game poses a draw with: the states it moves between, what each of them plays, and how far along that is.

A game writes its states as a fieldless enum under AnimationStates, which states what each state plays — a clip looping, a clip once, two blended, or one a value scrubs — and where the machine goes from there. ctx.animate runs an Animator of those states against the game’s own input, and Instance::posed draws a mesh in the pose it holds. No clip length and no time of a game’s own crosses either call: a state reads Progress and states a Transition.

Structs§

Animator
The machine a game poses a draw with: the state it is in, what that state plays, and the fade out of the state it left.
Motion
What a state plays: one clip, two of them blended, or one a value of the game’s own scrubs.
Progress
How far along what it plays a machine is, which a state reads to decide where to go next.
Transition
Where a machine goes next, and how it gets there.

Traits§

AnimationStates
The states a game poses one mesh through, and what each of them plays.