-
-
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
WebXRManager: Clear state and added some accessor functions #22260
Conversation
Merge with main repo
src/renderers/webxr/WebXRManager.js
Outdated
|
||
}; | ||
|
||
this.getxrFrame = function () { |
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.
Isn't frame
available already in the onAnimationFrame()
callback?
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.
Yes, but then it has to be passed into the components that would like to have access.
For instance, I was experimenting with creating a cube layer for the background and it was handy to have it available on the xr
object.
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.
@mrdoob I can remove it if you prefer
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 see...
How about following the naming pattern of the other methods and call it getFrame()
?
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.
done
Thanks! |
Some of the state wasn't cleaned up in the WebXR manager which could lead to errors.
Also added some helper to give easier access to WebXR state
This contribution is funded by Oculus.