Skip to content
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

Enabling support for XR in CSS3DRenderer #22786

Closed
andreacarpibomber opened this issue Nov 5, 2021 · 4 comments
Closed

Enabling support for XR in CSS3DRenderer #22786

andreacarpibomber opened this issue Nov 5, 2021 · 4 comments

Comments

@andreacarpibomber
Copy link

It would be highly beneficial to render CSS objects in 3D in VR mode, like iframes! This would de a huge milestone, and I think that is possible since WebGLRenderer already supports WebXR.

@Mugen87
Copy link
Collaborator

Mugen87 commented Nov 5, 2021

To clarify things, you can't use DOM elements in XR except when the WebXR DOM Overlays Module is enabled. However, this extension is intended for 2D interactive content presented as an overlay.

Instead, you have to render DOM elements into a canvas and then use them as textures in your 3D scene. HTMLMesh does this which is used e.g. in webxr_vr_sandbox.

I think integrating HTMLMesh into the CSS renderers somehow is out-of-scope right now.

@andreacarpibomber
Copy link
Author

Looks promising! But does it provide interaction with the HTML allowing users to scroll and touch buttons? I think this would be very useful indeed!

@Mugen87
Copy link
Collaborator

Mugen87 commented Nov 5, 2021

HTMLMesh dispatches events to the original DOM element and then redraws the canvas to honor UI changes. So interaction is possible.

@andreacarpibomber
Copy link
Author

I will try! Thanks!

@mrdoob mrdoob closed this as completed Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants