-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Restore original camera FOV and Zoom after XR presentation ends #30374
base: dev
Are you sure you want to change the base?
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
Hi, I noticed that the camera FOV had changed from 50 to 74.999. So I made this changes in case you find it useful. Best regards |
src/renderers/webxr/WebXRManager.js
Outdated
if ( camera.userData.previousFov === undefined ) { | ||
|
||
camera.userData.previousFov = camera.fov; | ||
|
||
} | ||
|
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.
Camera fov and zoom should be memoized at the top-level of this class and overriden/restored on sessionstart
and sessionend
. You will find this for renderer properties, and it would be the same here.
WebGLRender has been restored, now it is not involved at all.
Code has been updated as per comments |
Related issue: #XXXX
Description
This change restores the fov value of the camera before entering a WebXR session.