Skip to content

Fix Lottie paint order (#9); smoother skeleton drawing and bone handles - #10

Merged
1351438 merged 1 commit into
mainfrom
fix/lottie-paint-order
Nov 9, 2026
Merged

1351438 merged 1 commit into
mainfrom
fix/lottie-paint-order

Conversation

@1351438

@1351438 1351438 commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

What & why

Closes #9.

  • Lottie: Lottie draws a group's first style on top, Rive draws a shape's first paint underneath. convertLottie kept list order, so a stroke listed before its fill was covered. Paints are now created in reverse (packages/lottie/src/convert.ts). New scripts/lottie-paint-order.test.ts (part of test:lottie) fails without the fix.
  • Bone tool: stays active after creating a bone so a chain can be drawn tip to tip (Esc/V exits). Previously it reverted to Select after every bone.
  • Bone handles: the 10px tip/base grab zones covered the whole shaft of short (zoomed-out) bones, so they could not be rotated. Grab radius now shrinks with on-screen bone length (boneEditing.ts), with a new bone-editor scenario (28 total).

How to test

  1. bun run test:lottie and bun scripts/bone-editor.test.ts.
  2. In the editor press B, drag bone after bone from each tip; zoom out and rotate a short bone by its shaft.

Screenshots / recording

Verified interactively in the browser (chain drawing, move, rotate, tip edit, one undo step each); no screenshots attached.

Checklist

  • check-types, lint on changed files and the Lottie/bone tests pass
  • Not run locally: rigging.test.ts render step and bone-browser.test.ts (need Playwright Chromium); Lottie corpus (needs fixtures)
  • Docs updated (docs/user-guide.md)
  • AI tools used: written with Claude Code; changes exercised in the browser

…ible; keep Bone tool active; scale bone grab zones

Lottie draws a group's first style on top while Rive draws a shape's first paint underneath,
so convertLottie now creates paints in reverse (fixes #9).
Bone tool stays active after each bone so chains can be drawn tip to tip.
Bone tip/base grab radius shrinks for short (zoomed-out) bones so the shaft can still be rotated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@1351438
1351438 merged commit 85ca583 into main Nov 9, 2026
7 of 8 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.

convertLottie: paints created in Lottie list order, so a stroke listed before its fill ends up hidden under it

1 participant