Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WEB-1799: Camera Staying in the same location across models #2862

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

AlexandruPopovici
Copy link
Contributor

@AlexandruPopovici AlexandruPopovici commented Sep 3, 2024

Description & motivation

Fixes original issue: https://linear.app/speckle/issue/WEB-1799/camera-staying-in-the-same-location-across-models
Additionally:

  • When loadObject is called with the zoomToObject flag set, the camera also returns to it's default predefined orientation
  • zoomToBox now actually runs with no animation if it's called with it's transition flag set to false
  • CameraController now has a default function which returns the camera to it's default predefined orientation

I would recommend we get rid of the zoomToObject flag from loadObject 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 scenes

Changes:

To-do before merge:

Screenshots:

Validation of changes:

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

References

…hing between loaded objects. If zoomToBox is requested as non animated, now it actually is non animated. Added a default function to the camera controller extensions which moves the camera to the predefined location/orientation
Copy link

linear bot commented Sep 3, 2024

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