Skip to content

fix: continuous joints spin instead of rocking - #3

Open
Aymericr wants to merge 6 commits into
mainfrom
ak-18/continuous-spin
Open

Aymericr wants to merge 6 commits into
mainfrom
ak-18/continuous-spin

Conversation

@Aymericr

Copy link
Copy Markdown
Contributor

Stacked on #2 (and #1); until they merge this diff includes their commits.

What and why

Continuous joints (wheels, fans, knobs, globes) followed the same sine sweep as limited joints, over the ±π fallback range, so they rocked back and forth instead of turning. In Articraft-10K that is 7,734 of 37,143 movable joints (20.8 %). They now turn one full revolution per motion period (4.49 s), in the editor and in the exported : loop clip, which stays seamless (the last key is the first rotation).

Revolute and prismatic joints keep their sweep.

Failing case first

Commit 1 adds two tests that fail on main:

  • motion.test.ts: a continuous joint's value at 1/8…8/8 of the period is 1/8…8/8 of a turn, and keeps growing (3 periods = 3 turns). On main it oscillates.
  • animation.test.ts: the baked quaternion track is a quarter turn at a quarter loop, half a turn at half, back to rest at the end. On main a quarter loop is already π away.

Proof

bun test: 33 pass, 0 fail. bun run check-types: clean.

Try it

Place a catalog asset with a continuous joint (search "globe", "fan" or "wheel") and start its motion: it turns continuously.

🤖 Generated with Claude Code

Aymericr and others added 6 commits September 26, 2026 20:58
…iling first

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The host ships @pascal-app/core 1.0.3 on three 0.186, which the <1.0.0 and
^0.185 ranges excluded, so strict installs refused the plugin. Dev
dependencies follow the host (core/editor/viewer 1.0.3, three 0.186.0,
@types/three 0.184.1 as in pascalorg/editor).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Every slider passed restoreOnCommit={false}: SliderControl pauses history for
the drag and, with the flag off, resumes without a tracked write, so a drag of
scale, position, rotation or a joint left no undo step. The default restores
the pre-drag value and writes the final one as a single tracked change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Continuous joints (wheels, fans, knobs: 20.8 % of the catalog's movable joints)
followed the same sine sweep as limited ones, over a fallback range of ±π, so
they rocked back and forth. They now turn one full revolution per motion
period, live and in the exported loop clip, which stays seamless.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@pascal

pascal Bot commented Sep 27, 2026

Copy link
Copy Markdown

I hit an error while handling your request (Model unavailable on AI Gateway free tier: Free tier users do not have access to this model. Upgrade to paid credits at https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dtop-up for unrestricted…).

Please try again, rephrase, or reach out if it keeps failing.

Error id: bc8abf40-8a0c-4ae3-97b3-70180d34df33

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