feat(core): GlobeController with inertia, tilt & pan#10298
Merged
Conversation
Collaborator
|
Polished! It did occur to me recently, that we should consider combining the logic in your new Agree? |
Collaborator
Author
Indeed, perhaps we could switch to |
chrisgervang
approved these changes
May 13, 2026
Collaborator
chrisgervang
left a comment
There was a problem hiding this comment.
Great work you guys, this feels intuitive!
charlieforward9
approved these changes
May 13, 2026
This was referenced May 13, 2026
Co-Authored-By: charlieforward9 <charlesrichardsonusa@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Alternative implementation to #10249
The current
GlobeControllerhas several limitations:bearingorpitchApproach
This PR adds a set of utilities that perform full 3D spherical calculations, both when processing input and animating transitions by simulating a rigid sphere
Back compatibility
When the
bearingis0, the old behavior is retained, with the polar axis kept pointing up. Inertia is enabled in this mode to give a more responsive feel thoughScreen.Recording.2026-05-13.at.14.59.05.mov
New behavior
When the bearing is changed, the polar lock is removed and the globe can move freely in all directions
Screen.Recording.2026-05-13.at.15.02.41.mov
Notice how the bearing changes during the transition in order the keep the orientation valid
Touches outside globe
The input handling is unchanged, in that pointer events outside the globe are treated the same as inside. No attempt is made to "grab" an exact point on the sphere and anchor it as it leads to strange behavior at the edge of the sphere
Changes
globe-utils.tswithGlobespherical math helper andGlobeInertiaInterpolatorfor transitionsGlobeControllerto defer toGlobewhen updating viewportinertiaparameter