five-on-it / apps/client/src/renderer/clips
apps/client/src/renderer/clips
The character's clips: the keyframed motions of its rigid parts, made in Blender by assets/blender/models/animations.py and exported to models/animations.json, which the client samples itself (no Babylon animation groups: the people are thin instances posed by per-part matrices, models.ts). A clip has a duration, loops or plays once, keys the whole figure (full: every part and the root, the empty at the feet a crouch drops and a roll turns) or some of its upper parts only (upper: drawn over a full clip, which keeps the parts it leaves alone), and a locomotion clip a stride (the metres one cycle covers, so it plays as fast as the figure moves). Between two keys a turn is interpolated component by component and normalized, as Blender's linear curves do, so what Blender shows is what the game draws.
A Pose is a turn per part (in the part's own frame, the model file's) and the root's place and turn; sampling writes into one, blending two makes the crossfade between clips. Nothing here allocates per frame.