-
Notifications
You must be signed in to change notification settings - Fork 22
Fix orthographic camera near and far parameters #743
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
base: main
Are you sure you want to change the base?
Conversation
Preview PR at appsharing.space |
Integration tests report: appsharing.space |
this._camera.updateProjectionMatrix(); | ||
} | ||
} | ||
this._camera = new THREE.PerspectiveCamera( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why we're removing the check for the current camera setting?
@@ -1075,6 +1054,8 @@ export class MainView extends React.Component<IProps, IStates> { | |||
} else { | |||
this._refLength = null; | |||
} | |||
|
|||
this._updateCamera(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible, we shouldn't reset the camera entirely here (note we're already have some code in this method that updates some camera parameters).
Instead, we should only set the new near
and far
if it's an orthographic camera.
Co-authored-by: martinRenou <martin.renou@gmail.com>
Co-authored-by: martinRenou <martin.renou@gmail.com>
Co-authored-by: martinRenou <martin.renou@gmail.com>
Shall fix #742
orthographic.mp4
orth.mp4