WebXRManager: Lazily initialise XRWebGLBinding#31648
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.
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.