-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
WebXRManager: Lazily initialise XRWebGLBinding #31648
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
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
|
N.B. I can't test |
|
And just for posterity, the reason that this fixes the emulator is that Chrome doesn't implement layers (so |
|
I've tested camera access with this PR and can confirm everything's still working! Sorry for breaking all the emulators :-) |
|
Thanks for the reviews + testing! |
| this._referenceSpace = await session.requestReferenceSpace( this.getReferenceSpaceType() ); | ||
|
|
||
| if ( this._supportsLayers ) { | ||
| if ( this._sessionUsesLayers ) { |
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.
Everywhere else uses this._sessionUsesLayers === true
Related: #31443 #30319 #30282 #31432
Description
Initialise the
XRWebGLBindingas needed:A knock-on of this is that the Immersive Web Emulator and other webxr-polyfill consumers will work again (without needing to polyfill layers), but this is probably useful outside of that reason.