WebXRQuestEmulator icon indicating copy to clipboard operation
WebXRQuestEmulator copied to clipboard

Simulator does remove canvas from custom web components and after session the canvas is not in the document anymore

Open marwie opened this issue 1 year ago • 3 comments

Hello, currently when ending the XRSession the renderer seems to be broken.

It works as expected on device returning to the original rendering state

https://github.com/meta-quest/immersive-web-emulator/assets/5083203/477f4b86-b2ca-46c1-a176-d51abc198134

marwie avatar Jan 04 '24 12:01 marwie

Oh seems to be related to our project

marwie avatar Jan 04 '24 12:01 marwie

Hi - so it seems the issue is related to the canvas being a child of a shadowRoot container with a custom web component. See the glitch project for reproducting it here: https://zircon-sunset-singer.glitch.me/ (you can exit XR using the ESC key)

Here's the code: https://glitch.com/edit/#!/zircon-sunset-singer?path=index.html

This might even be an issue inside three.js - I will update this issue if I have any more information

I even get 2 canvases that are reparented to the root document when the XR session starts

https://github.com/meta-quest/immersive-web-emulator/assets/5083203/babf1b4e-fa2d-4427-a789-904a5ff893ef

and when the session ends the canvas gets removed from the document altogether

https://github.com/meta-quest/immersive-web-emulator/assets/5083203/ea0437aa-104f-4b0a-b4f4-affe2d938895

marwie avatar Jan 04 '24 14:01 marwie

This doesnt happen when using Quest with Link

marwie avatar Jan 04 '24 15:01 marwie