diff --git a/README.md b/README.md index c7e7fa7..e359615 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.4 +**Version:** 0.5.0 **Lib-ID:** lib-core.puppet **Requires:** (none — pure Lua + engine.render.* + engine.asset.*) **Tags:** animation, skeleton, puppet, character @@ -97,10 +97,13 @@ sprite-mode rendering; omit for colored-rect-only rigs. ### `puppet.load_textures(rig, asset_aliases)` -For each bone with a `texture` field, resolves the atlas-id to a -texture-handle via the asset-lib indirection. Also resolves bone anchors -from the atlas (unless the bone has an explicit `anchor` field). Caches -texture dimensions for locomotion sprite_reach computation. +Lädt den Atlas des Rigs (`asset_pack`) und bindet jeden Bone mit +`texture`-Feld an dessen UV-Rect im Atlas. Seit v0.5.0 (M.2-Rewrite) hält +das Rig **einen** Atlas-Texture-Handle (`rig.atlas.diffuse_texture_handle`); +die Bones referenzieren Atlas-Index + UV-Rect statt eines per-Bone-Handles +über die alte Asset-Alias-Indirection. Löst zudem Bone-Anchors aus dem Atlas +auf (sofern der Bone kein explizites `anchor`-Feld hat) und cacht die +Texture-Höhe für die Locomotion-`sprite_reach`-Berechnung. ### `puppet.load_animation(path, rig)` @@ -151,6 +154,17 @@ Not for production use. ## CHANGELOG +### v0.5.0 +- Atlas-Handle Bone-Draw: `render` zeichnet jeden Bone über den einzelnen + Atlas-Texture-Handle (`rig.atlas.diffuse_texture_handle`) plus per-Bone + UV-Rect (ADR-0044 Source-Rect-Args), statt eines per-Bone-Handles. +- `load_textures` M.2-Rewrite: Per-Atlas-Texture-Handle; Bones referenzieren + Atlas-Index + UV-Rect statt der alten per-Bone Asset-Alias-Indirection. +- `bone_world_transform(handle, bone_id)`: gibt die gecachte + Welt-Transform `x, y, rot` des Bones zurück. +- Anchor-Hardcoding: Render liest `b.anchor[1]/[2]` (Default 0); fehlender + Bone-Anchor wird in `load_textures` auf die Tile-UV-Mitte gesetzt. + ### 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. @@ -216,7 +230,7 @@ Not for production use. ## References -- `architecture/puppet.md` (Reference — updated to v0.4.4) +- `architecture/puppet.md` (Reference — updated to v0.5.0) - `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) diff --git a/init.lua b/init.lua index 043c2b9..ea5a9ed 100644 --- a/init.lua +++ b/init.lua @@ -1,4 +1,4 @@ --- lib-core.puppet v0.4.0 +-- lib-core.puppet v0.5.0 -- Skeletal animation: skeleton + bones + tracks + rest + keyframe -- + procedural + look-at constraint. Multi-channel animation (rot/pos/scl) -- + cascaded world-transform with scale propagation.