-
-
Notifications
You must be signed in to change notification settings - Fork 400
feat(XR): Add base WebXR AR support to OpenGL RenderWindow #2202
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
2346576 to
d221583
Compare
|
Only thing I would suggest is adding basic (just empty or similar) startXR methods (or some query for the feature) to RenderWindowViewNode which is the superclass for API specific RenderWindows. Otherwise with WebGPU I think it will cause console errors yes? |
|
@martinken I haven't specifically tested for WebGPU behavior, are there resources I could use to look into this? In any case, isn't it reasonable to throw a console error if we try to enter XR on an unsupported backend? |
|
If we only call them when someone is asking to go into VR then sure (which looks like the case here) , though the console message will be that the method doesn't exist as opposed to something nicer. Might be nice to have a query method for if the API supports it so we could hide the toggle. e.g. if on an API (e.g. WebGPU) that doesn't support XR, don;t show the toggle. So even if the browser supports WebXR, if the backend doesn;t support it we don;t show the GUI toggle. It could be something like RenderWindowViewNode.supportsFeature('WebXR') and defaults to false for everything. Then in WebGL we return true for that. |
|
Love it! |
|
🎉 This PR is included in version 21.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
PR and Code Checklist
npm run reformatto have correctly formatted codeContext
First step in adding AR support as part of our WebXR investigation.
Changes
OpenGL/vtkRenderWindowto supportimmersive-arsessions via the WebXR AR moduleResults
Testing
npm test example -- ARand visit the displayed LAN address in your mobile browser. May require adjusting firewall rules on your host machine.