WEB-1799: Camera Staying in the same location across models #2862
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.
Description & motivation
Fixes original issue: https://linear.app/speckle/issue/WEB-1799/camera-staying-in-the-same-location-across-models
Additionally:
loadObject
is called with thezoomToObject
flag set, the camera also returns to it's default predefined orientationzoomToBox
now actually runs with no animation if it's called with it'stransition
flag set tofalse
CameraController
now has adefault
function which returns the camera to it's default predefined orientationI would recommend we get rid of the
zoomToObject
flag fromloadObject
as it's too specific in my opinion. It was originally added as a helper to the frontend but I think it outlived it's purpose. The client application (frontend) should be responsible for calling camera controller related commands, rather than having the viewer library do stuff automatically behind the scenesChanges:
To-do before merge:
Screenshots:
Validation of changes:
Checklist:
References