Skip to content

Add animation-follower desc YAML to mirror controller transforms#65

Merged
earlye merged 1 commit into
mainfrom
follower-nodes
Jun 22, 2026
Merged

Add animation-follower desc YAML to mirror controller transforms#65
earlye merged 1 commit into
mainfrom
follower-nodes

Conversation

@earlye

@earlye earlye commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • New kind: animation-follower desc YAML annotation causes an SVG element to mirror its controller's transform
  • Controller is resolved by inkscape:label or SVG id via the controller: key
  • Follower transform is applied on every anim_setAbsFrame (timeline scrub/playback) and immediately when the user drags the controller on the canvas (via new SvgElementTrack::captured signal)
  • Uses setCurrentBaseValue per leaf animator — O(1) per leaf, not a full keyframe serialize/deserialize

Usage

<desc>kind: animation-follower
controller: head</desc>

Test plan

  • Add kind: animation-follower / controller: <name> desc to a layer in an SVG linked into a Friction project
  • Verify the follower moves with the controller when scrubbing the timeline
  • Verify the follower moves with the controller when dragging the controller element on the canvas
  • Verify just run-debug-followers logs binding resolution and per-frame propagation
  • Verify a missing controller name logs a warning and does not crash

🤖 Generated with Claude Code

SVG elements annotated with kind: animation-follower and controller: <name>
automatically mirror the named controller element's transform at every frame,
both during timeline playback (anim_setAbsFrame) and when the user drags the
controller directly on the canvas (SvgElementTrack::captured signal).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@earlye earlye merged commit 03e45b9 into main Jun 22, 2026
5 of 8 checks passed
@earlye earlye deleted the follower-nodes branch June 22, 2026 14:19
earlye added a commit that referenced this pull request Jun 23, 2026
Document kind:animation-follower SVG desc annotation (PR #65), the
SVG stroke-width import bug fix (PR #66), and the Justfile fix.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant