Expand description
Animation State Machine and Blend Trees.
Provides a complete animation runtime for Proof Engine entities:
AnimationClip— named sequence of keyframe channels over timeAnimationCurve— per-property float curve (driven by MathFunction or raw keyframes)BlendTree— 1D/2D weighted blend of multiple clipsAnimationLayer— masked layer (e.g., upper-body, full-body)AnimationState— named state that plays a clip or blend treeTransition— condition-triggered crossfade between statesAnimatorController— top-level controller driving all layers
§Quick Start
use proof_engine::animation::*;
let mut ctrl = AnimatorController::new();
ctrl.add_state(AnimationState::clip(AnimationClip::new("idle", 1.0, true)));
ctrl.add_state(AnimationState::clip(AnimationClip::new("run", 0.8, true)));
ctrl.add_state(AnimationState::clip(AnimationClip::new("attack", 0.4, false)));
ctrl.add_transition(Transition::new("idle", "run", Condition::float_gt("speed", 0.1)));
ctrl.add_transition(Transition::new("run", "idle", Condition::float_lt("speed", 0.05)));
ctrl.add_transition(Transition::new("idle", "attack", Condition::trigger("attack")));
ctrl.start("idle");Modules§
- ik
- Inverse Kinematics solvers.
- sprite_
anim - Sprite Animation System — frame-by-frame ASCII art animation.
Structs§
- Active
Transition - Animation
Clip - Named set of channels that animate properties over time.
- Animation
Event - Animation
Layer - A layer runs its own state machine and blends on top of lower layers.
- Animation
Output - Sampled property output from a full controller tick.
- Animation
State - Animator
Controller - Drives one or more AnimationLayers with shared parameter space.
- Bezier
Key - Blend
Tree - Fired
Event - Root
Motion - Root motion extracted from animation, applied to entity transform.
- Transition
Enums§
- Animation
Curve - A single float channel over normalized time [0, 1].
- Blend
Tree Kind - Blend mode for a BlendTree.
- Condition
- Condition that must be satisfied for a state transition to fire.
- Param
Value - State
Content
Functions§
- add_
output - Additively layer
additiveon top ofbasewithweight. - blend_
outputs - Linearly blend two AnimationOutputs by alpha (0 = a, 1 = b).
- mirror_
output - Mirrors an AnimationOutput left/right (negate X-axis channels).