Skip to main content

Module animation

Module animation 

Source
Expand description

Chaos RPG Animation State Machines, Blend Trees, and IK

Wires the Proof Engine animation infrastructure into the Chaos RPG game loop. Every entity is an amorphous cluster of glyphs — animation here means driving per-glyph transforms (position offsets, scale, rotation, emission) through state machines, blend trees, and simplified inverse kinematics.

Structs§

AnimPose
A snapshot of per-glyph transforms for an entire entity.
AnimTransitionDef
Defines a transition between two animation states.
AnimationManager
Centralized animation manager owning all active controllers.
AttackPowerBlend
AttackPowerBlend: parameter = force_stat [0, 1], blends light swing into heavy swing.
BlendTree1D
A 1D blend tree: interpolates between poses based on a single float parameter.
BossAnimController
Per-boss animation controller wrapping EnemyAnimController with boss-specific logic.
CastIntensityBlend
CastIntensityBlend: parameter = mana_cost_fraction, small cast → large cast.
DamageReactionBlend
DamageReactionBlend: parameter = damage_fraction [0, 1], small → large recoil.
EnemyAnimController
Simpler animation controller for enemies.
GlyphTransform
Transform applied to a single glyph within an entity.
IKChain
A simplified 2-bone IK chain operating on glyph positions.
IKLimb
Named IK chain for a specific limb/purpose.
IdleWalkBlend
IdleWalkBlend: parameter = movement_speed [0, 1], blends idle bob into walk bob.
PlayerAnimController
Drives per-glyph transforms for a player entity based on the current state.

Enums§

AlgorithmAnimState
Algorithm boss: multi-phase encounter with entity reorganization.
BlendCurve
Easing function applied during state transitions.
BossState
Unified boss state enum.
CommitteeAnimState
Committee boss: judges that vote on player fate.
EnemyAnimState
Base enemy animation states.
HydraAnimState
Hydra boss: can split and reform.
IKTarget
What an IK chain is targeting.
PlayerAnimState
All possible player animation states in the Chaos RPG.

Functions§

build_transition_table
Return the full transition table as a Vec (useful for inspection/serialization).
look_at_ik
Create a look-at IK limb for head/eye orientation.
shield_ik
Create a shield IK limb that positions between player and threat.
solve_two_bone
Analytical two-bone IK solver.
staff_aim_ik
Create a staff-aim IK limb for mage casting.
weapon_arm_ik
Create a weapon-arm IK limb that aims at the current target enemy.