Skip to main content

Module animation

Module animation 

Source
Expand description

Animation State Machine and Blend Trees.

Provides a complete animation runtime for Proof Engine entities:

  • AnimationClip — named sequence of keyframe channels over time
  • AnimationCurve — per-property float curve (driven by MathFunction or raw keyframes)
  • BlendTree — 1D/2D weighted blend of multiple clips
  • AnimationLayer — masked layer (e.g., upper-body, full-body)
  • AnimationState — named state that plays a clip or blend tree
  • Transition — condition-triggered crossfade between states
  • AnimatorController— top-level controller driving all layers

§Quick Start

use proof_engine::animation::*;
let mut ctrl = AnimatorController::new();
ctrl.add_state("idle",   AnimationState::clip("idle_clip",   1.0, true));
ctrl.add_state("run",    AnimationState::clip("run_clip",    0.8, true));
ctrl.add_state("attack", AnimationState::clip("attack_clip", 0.4, false));
ctrl.add_transition("idle",   "run",    Condition::float_gt("speed", 0.1));
ctrl.add_transition("run",    "idle",   Condition::float_lt("speed", 0.05));
ctrl.add_transition("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§

ActiveTransition
AnimationClip
Named set of channels that animate properties over time.
AnimationEvent
AnimationLayer
A layer runs its own state machine and blends on top of lower layers.
AnimationOutput
Sampled property output from a full controller tick.
AnimationState
AnimatorController
Drives one or more AnimationLayers with shared parameter space.
BezierKey
BlendTree
FiredEvent
RootMotion
Root motion extracted from animation, applied to entity transform.
Transition

Enums§

AnimationCurve
A single float channel over normalized time [0, 1].
BlendTreeKind
Blend mode for a BlendTree.
Condition
Condition that must be satisfied for a state transition to fire.
ParamValue
StateContent

Functions§

add_output
Additively layer additive on top of base with weight.
blend_outputs
Linearly blend two AnimationOutputs by alpha (0 = a, 1 = b).
mirror_output
Mirrors an AnimationOutput left/right (negate X-axis channels).