Skip to content

Turn the view smoothly when the view cube is clicked - #715

Closed
crazykay wants to merge 1 commit into
henmedia:mainfrom
crazykay:view-cube-smooth-turn
Closed

crazykay wants to merge 1 commit into
henmedia:mainfrom
crazykay:view-cube-smooth-turn

Conversation

@crazykay

Copy link
Copy Markdown

A click on a face, edge or corner of the view cube used to cut the camera there in one frame. The camera now turns around the orbit pivot in about a third of a second: the distance stays, the azimuth takes the shorter way round, and an ease-out cubic settles into the clicked view.

  • A second click starts from wherever the first has got to.

    • Canvas drag, wheel, touch, Home, zoom, focus selection, a saved view and a projection switch take over and end the turn.
    • The AI bridge's layerlingCaptureView still sets the view immediately, so captures do not change.
    • Pure helper in lib/viewCubeTransition.ts with unit tests in viewCubeTransition.test.ts.
      Validation:
  • npm test: 2812/2812

    • npm run typecheck
    • npm run export: static export succeeds
    • Sampled frame by frame in the dev server: front reaches 0° in about 250 ms and stays; top settles at -89.9943° as before; Home in the middle of a turn jumps to the home view and stops there.

A click on a face, edge or corner of the view cube cut the camera there in one frame. The camera now turns around the orbit pivot in about a third of a second: the distance stays, the azimuth takes the shorter way round, and an ease-out settles into the clicked view.

Any camera input, Home, zoom, focus selection, a saved view or a projection switch takes over and ends the turn. The AI bridge's view capture still sets the view immediately.

Unit tests in viewCubeTransition.test.ts; sampled frame by frame in the dev server.
@henmedia

Copy link
Copy Markdown
Owner

@crazykay Thank you, this is a nice touch. I went through it and tested it with the other changes here, and it works. One thing I would like to add: when the system is set to reduce motion, the view should still jump as before and not turn. I add that check myself when I merge, so you do not need to change anything.

henmedia added a commit that referenced this pull request Oct 22, 2026
…715), text height (#724), STEP groups (#709); cards

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@henmedia

Copy link
Copy Markdown
Owner

@crazykay this is out in 1.100.0, thank you.

@henmedia

Copy link
Copy Markdown
Owner

Closing this one: the change is in main and out in a release, so there is nothing left to merge here. Thank you again.

@henmedia henmedia closed this Oct 22, 2026
henmedia added a commit that referenced this pull request Oct 22, 2026
The view cube's smooth turn (#715) moved into cameraRig so both windows share it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

2 participants