Skip to content

Animation naturalness: spline interpolation, foot-flat, bar grip, secondary motion (L2–L4.2) - #37

Merged
a-baran-orhan merged 26 commits into
mainfrom
feat/l3-post-ik
Jul 12, 2026
Merged

Animation naturalness: spline interpolation, foot-flat, bar grip, secondary motion (L2–L4.2)#37
a-baran-orhan merged 26 commits into
mainfrom
feat/l3-post-ik

Conversation

@a-baran-orhan

@a-baran-orhan a-baran-orhan commented Jul 11, 2026

Copy link
Copy Markdown
Member

Raises procedural animation quality toward mocap-grade across the whole platform — both the rendered motion and the .posecode DSL/editor. Built as sequenced, independently-tested slices.

What's in here

L2 — Spline-quaternion interpolation. Replaced per-segment slerp with squad (squad.ts) so motion flows through interior keyframes instead of stop-starting. New per-phase timing modes flow | settle | drive | snap | linear (legacy ease-* kept as deprecated aliases so all existing docs still parse). Editor: completion/hover/highlight + deprecation hints.

L3.1 — Foot-flat (plantigrade) correction. levelPlantedFeet keeps planted soles flat to the floor (weighted by planted-ness, ROM-clamped, skipped on authored plantarflex). Fixes squat/lunge "balancing on the toes." No new DSL needed.

L3.2 — Bar-grip system. New grip: directive → two-point bar_left/bar_right anchors, per-hand arm IK onto each grip, and a procedural finger wrap (wrapGrip). Fixes pull-up/dead-hang/hanging-knee-raise (were open palms converged at bar centre). Full parser/schema/editor support.

L4.1 — Relaxed resting hands. relaxHands gives idle hands a natural curl (skips gripping + authored fingers).

L4.2 — Locomotion arm swing. swingArms adds contralateral arm swing driven by hip motion (skips authored shoulders + gripping sides).

L4.3 — Look-at head tracking. aimHead/applyLookAt turn the head toward the active contact (up at the bar in a pull-up, down at a floor reach), clamped to a healthy neck range; skipped when a move poses the head/neck.

L4.3 scope

Built look-at (the highest-value piece). Weight-shift and spine overshoot/follow-through were deliberately left as optional follow-ups — L2's squad already gives velocity continuity, so overshoot is low-value and risky.

Verification

  • 243 tests pass; typecheck clean across all packages.
  • Browser-verified: squat rests flat + relevé stays on toes; pull-up grips the bar shoulder-width with wrapped fingers.

Merge note

origin/main was merged in. Main independently reworked foot/bar contact (alignFloorSoles/alignBarGrips/contactSides); per direction, this branch's approach wins on conflict — took our complete versions of the overlapping solver files and accepted main's non-overlapping additions (new example moves, playground styling). Main's unused sword/gun prop attachments were dropped (no example references them).

Specs/plans under docs/superpowers/.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
posecode Ready Ready Preview, Comment Jul 12, 2026 1:37pm

Resolve conflicts in favor of the L2-L4 animation work (spline interpolation,
foot-flat, bar grip, secondary motion), which supersedes overlapping main edits.
… contact work

Main and this branch independently reworked foot/bar contact (main: alignFloorSoles/
alignBarGrips/contactSides; here: levelPlantedFeet/wrapGrip + L4 secondary motion).
Per direction, this branch's approach wins on conflict. Took our complete versions of
contacts.ts, index.ts, props.ts, timeline.ts, render.test.ts, eval probe/checks, and
pull-up/squat examples; accepted main's non-overlapping additions. Added
showProceduralWhileLoading to ViewerOptions for playground API compatibility.
241 tests pass, typecheck clean.
@a-baran-orhan a-baran-orhan changed the title Feat/l3 post ik Animation naturalness: spline interpolation, foot-flat, bar grip, secondary motion (L2–L4.2) Jul 11, 2026
…oves via clip directive

Clips sourced from Mixamo, kept out of the repo (loaded from public/clips, gitignored for
storage/CDN). Mapped walk/squat/bicycle-crunch/jab-cross/jumping-jacks/shuffling in the
playground; squat/jumping-jacks/jab-cross/bicycle-crunch opt in with clip "<name>".
Verified: squat plays the retargeted Back Squat clip (clipActive=true), no console errors.
@a-baran-orhan
a-baran-orhan merged commit 51f35ed into main Jul 12, 2026
3 checks passed
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