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

Editor: Don't overwrite editor camera in Viewport. #19826

Merged
merged 1 commit into from Jul 10, 2020
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jul 10, 2020

This PR fixes a subtle bug in Viewport. When the viewport camera is changed, the viewportCameraChanged handler assigns the new camera to camera and thus overwrites the references to the editor's default perspective camera.

This actually breaks the resizing logic which is now encapsulated in updateAspectRatio(). To avoid this and for clarity reasons, it's best when the camera variable in Viewport always points to editor.camera.

@mrdoob mrdoob added this to the r119 milestone Jul 10, 2020
@mrdoob mrdoob merged commit c10eb1e into mrdoob:dev Jul 10, 2020
@mrdoob
Copy link
Owner

mrdoob commented Jul 10, 2020

Thanks!

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.

None yet

2 participants