diff --git a/README.md b/README.md index 0f6a725..c7e7fa7 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ playback (multi-channel: rot/pos/scl), multi-target look-at constraints and a per-channel conflict guard that allows animation and procedural layers to coexist on the same bones. -**Version:** 0.4.3 +**Version:** 0.4.4 **Lib-ID:** lib-core.puppet **Requires:** (none — pure Lua + engine.render.* + engine.asset.*) **Tags:** animation, skeleton, puppet, character @@ -75,11 +75,14 @@ callback. Per-channel conflict guard: raises if the written channel is also written by a keyframe in any active animation on that bone's track. Allows procedural to write `rot` while an animation writes `scl` on the same bone. -### `puppet.play(handle, anim_id, {loop?, speed?})`, `puppet.stop(handle, anim_id)`, `puppet.stop_all(handle)`, `puppet.is_playing(handle, anim_id)` +### `puppet.play(handle, anim_id, {loop?, speed?})`, `puppet.stop(handle, anim_id)`, `puppet.stop_all(handle)`, `puppet.is_playing(handle, anim_id)`, `puppet.set_play_speed(handle, anim_id, speed)` (v0.4.4) Keyframe-layer controls. Animation must be registered via `puppet.register_animation(handle, anim)` first. `speed` defaults to 1.0; -pass a value like `0.45` for a slower cadence. +pass a value like `0.45` for a slower cadence. `set_play_speed` mutates the +speed of a currently-playing anim **without resetting its cycle position** +— useful for mid-anim speed changes (e.g., sprint toggle). Silent no-op +if the anim is not currently playing. ### `puppet.register_animation(handle, anim)` @@ -148,6 +151,13 @@ Not for production use. ## CHANGELOG +### v0.4.4 +- `puppet.set_play_speed(handle, anim_id, speed)`: mutates the play-speed + of a currently-running animation WITHOUT resetting its cycle position. + Silent no-op if anim is not playing. Use case: sprint-toggle mid-walk + doubles cadence smoothly (`puppet.play` with new speed would reset + `t = 0` and visibly restart the cycle). + ### v0.4.3 - `inherit_scale: false` bone flag: when false, `world.scl = local.scl` (parent.world.scl not multiplied). Position cascade still uses parent.scl. @@ -206,8 +216,8 @@ Not for production use. ## References -- `architecture/puppet.md` (Reference — updated to v0.4.3) -- `superpowers/specs/2026-05-18-puppet-subterrain-model-design.md` (Baseline Spec v0.4.3) +- `architecture/puppet.md` (Reference — updated to v0.4.4) +- `superpowers/specs/2026-05-18-puppet-subterrain-model-design.md` (Baseline Spec v0.4.3+) - `docs/adrs/0040-puppet-subterrain-model-pivot.md` (Pivot rationale) - ADR-0037 (Tests-as-Libs) - ADR-0038 (API-Doc-Convention)