Skip to content

fix(TrackballControls): invalidate on user input with demand frameloops#2746

Open
DevTomUK wants to merge 1 commit into
pmndrs:masterfrom
DevTomUK:fix/trackball-controls-demand-frameloop
Open

fix(TrackballControls): invalidate on user input with demand frameloops#2746
DevTomUK wants to merge 1 commit into
pmndrs:masterfrom
DevTomUK:fix/trackball-controls-demand-frameloop

Conversation

@DevTomUK

Copy link
Copy Markdown

Fixes #2745 (same problem as #1588 and #708)

TrackballControls is dead on arrival with frameloop="demand". The three-stdlib impl only applies pointer input inside update(), which drei runs in useFrame — but in demand mode no frame ever gets requested, so update() never runs and nothing you do produces a render. OrbitControls doesn't have this issue because its impl updates straight from the pointer handlers.

Fix: invalidate on the controls' start event, and on pointermove/touchmove while interacting. Wheel is covered too since it fires start per event.

Tested in a demand-frameloop sandbox: before, dragging renders nothing and the camera never moves; after, drag and wheel both work and damping settles on its own.

@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

@DevTomUK is attempting to deploy a commit to the Poimandres Team on Vercel.

A member of the Team first needs to authorize it.

@codesandbox-ci

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

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.

TrackballControls do not work with frameloop="demand"

1 participant