- Look-at uses math.atan(dx, -dy) (substrate sprite-top convention):
rot=0 means sprite top points up (in -Y), rot=pi/2 means right.
- New rest.rot_min/rot_max fields (degrees in JSON; clamped after look-at)
- New look_at_speed field (deg/s; rate-limits look-at via dt)
- write_bone now accepts rot/pos/scl channels (legacy 'angle' rejected)
- Bones not in any track are allowed; write_bone bypasses track-guard
for them. Enables procedural root-rotation while keyframe-anims play.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- apply_locomotion idle-return: after (now - last_move_time) >
idle_return_delay, the most-displaced planted leg steps back to its
current hip position (over idle_step_duration). Group-stagger via
bumping last_move_time forward by idle_return_stagger.
- M.move_to tracks p.last_move_time when position actually changes.
- README v0.3.0 changelog entry.
Additive extension to build_rig output, preserving backward-compat
with existing rigs that lack the new fields:
- bone.texture: optional atlas-id (string) for sprite-mode rendering;
resolved to a texture-handle by puppet.load_textures(). When absent
the bone falls back to colored-rect render via draw_rect_rotated.
- bone.z_order: render-sort key (lower = back, higher = front);
default 0.
- bone.scale: [sx, sy] pair; default [1, 1]; negative components
mirror the sprite.
- bone.anchor: optional [x, y] override of the atlas-supplied anchor.
- rig.asset_pack: alias-key into the consumer module's asset_aliases
manifest field; lets puppet.load_textures resolve atlas-ids to
texture-handles via the asset-lib.
- rig.bones_z_sorted: array of bones pre-sorted by z_order; render
walks this once per frame.
Version bumped to 0.2.0. Subsequent commits add multi-level parent-
chain transform, sprite-mode render, and load_textures.
Validates and cooks rig + animation data into internal representations:
- build_rig: parses bones (with parent-resolution to object refs) and
tracks (with bone-uniqueness validation). Converts rest angles
from JSON degrees to radians.
- build_animation: validates each keyframe references only bones in
the animation's declared track. Converts keyframe angles from
degrees to radians.
Remaining functions (sample_animation, spawn, update, look-at,
procedural, render, lifecycle) follow in subsequent commits.