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: Fixed ghost viewport camera #28277

Merged
merged 3 commits into from May 6, 2024

Conversation

ycw
Copy link
Contributor

@ycw ycw commented May 4, 2024

The issue: When a non-default active viewportCamera is removed, the viewport doesn't update its view:

ghost.cam.view.1.mp4

File>New has the same issue, viewport will select ghost camera if previous file's active viewportCamera isn't default camera:

ghost.cam.view.2.mp4

This PR fixed them all by checking if old viewportCamera is gone, then set default camera as viewportCamera.

Preview: https://raw.githack.com/ycw/three.js/editor-viewport-controls-cameras/editor/index.html

@ycw ycw requested a review from Mugen87 May 6, 2024 11:03
@ycw ycw requested a review from Mugen87 May 6, 2024 11:38
@Mugen87 Mugen87 added this to the r165 milestone May 6, 2024
@Mugen87 Mugen87 merged commit f17e262 into mrdoob:dev May 6, 2024
6 checks passed
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