Files
sporel-lib-core.puppet/init.lua
Axel Meyer 0b2bd7eab0 feat: add spawn/despawn + animation playback + look-at + procedural
Per-puppet instance state: position, facing, bone-state cache,
look-target, playing animations, registered procedural callbacks.

Per-frame update pipeline:
1. Reset bones to rest pose
2. Apply look-at constraint (bones marked look_at: true rotate to
   face the target's world-position)
3. Advance + sample keyframe animations on their tracks
4. Run procedural callbacks (write_bone validates that the bone's
   track is not currently keyframe-active)

Look-at math: bone world-pos = puppet origin + bone.rest offset
(parent-chain resolution stays simple in v0.1 since the only
look-at bone (head) attaches directly to torso at the origin).
Full parent-chain transform reserved for v0.2 when multi-level
rigs exist.
2026-05-17 19:57:03 +02:00

14 KiB