Skip to content

refactor: give each clock its own frame loop and queues - #2601

Draft
joshuaellis wants to merge 1 commit into
nextfrom
refactor/1586
Draft

joshuaellis wants to merge 1 commit into
nextfrom
refactor/1586

Conversation

@joshuaellis

Copy link
Copy Markdown
Member

Why

Each spring, controller and interpolation now runs on the clock it was created on, so a target can drive its own springs without stalling anyone else's. Every spring still gets the one default clock that Globals.assign configures, so nothing changes yet.

The scheduler and frame loop were module singletons, so when @react-spring/three switched them to React Three Fiber's demand mode, springs from @react-spring/web froze while no Canvas was rendering (#1586).

rafz and the frame loop were module singletons, so a target that drives
frames its own way (three follows React Three Fiber) changed how every
spring in the app ticked. Schedulers and frame loops are now created by
factories, and every spring, controller and interpolation runs on the clock
it was created on. Only the default clock exists so far, so nothing changes
yet.
@changeset-bot

changeset-bot Bot commented Sep 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9900a57

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@joshuaellis
joshuaellis added this pull request to stack #2603 September 28, 2026 18:56

This branch has not been deployed

No deployments
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