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

Support WebXR #318

Closed
jsantell opened this issue Apr 25, 2018 · 3 comments
Closed

Support WebXR #318

jsantell opened this issue Apr 25, 2018 · 3 comments

Comments

@jsantell
Copy link
Contributor

The webvr-polyfill should use native WebVR if it exists, fallback to a CardboardVRDisplay using sensors/devicemotion otherwise, and with this issue, should also map to a native WebXR implementation if it exists, and no native WebVR implementation found. This is necessary in the future as Chrome adpots WebXR, and deprecates the WebVR API.

Current plan is to ship this in webvr-polyfill by end of May.

@cvan
Copy link
Contributor

cvan commented Apr 25, 2018

thanks for the update. is there a timeline for the WebVR Origin Trials to complete? also, will WebXR undergo its own Origin Trial, or no?

@jsantell
Copy link
Contributor Author

@jsantell
Copy link
Contributor Author

At this time, we're not going to support patching WebVR content code to be wired to WebXR for a few reasons:

  • Magic Window runs into the dual-canvas issue (developer has to be aware of the bound events on the canvas, which is no longer the presentation canvas). Hacks involving sharing contexts and the like are too fragile. Technically could be implemented with devicemotion events before entering exclusive. This is looking very fragile, and extremely unappealing to maintain.
  • Could generate XRSessions that are invisible just to get the pose for use in other magic windows, but discouraged by the spec, and while technically this could work, @toji considers this unreliable in the future. MS and Oculus browsers serve identity poses in magic window as a solution.
  • Many of the VRDisplayCapabilities can be grabbed from a RAF in XR, but that'd have to be spun up to be available when navigator.getVRDisplays resolves. Things like hasPosition, and the render size.
  • Sites that would want to map their WebVR content code to WebXR browsers would need to keep the in-flux polyfill up-to-date (WebXR is still rapidly evolving) and keep the origin trial tokens up to date, which sounds like more work than just upgrading to WebXR in the first place (using the webxr-polyfill to support non-WebXR browsers)
  • Worst case scenario, when having WebVR content being unsupported on a WebXR browser with no WebVR support (none exist currently), then we still have the cardboard fallback via webvr-polyfill.

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

2 participants