mozilla / webxr-polyfill

A polyfill and example code for building augmented reality (AR) and virtual reality (VR) applications using WebXR.
Mozilla Public License 2.0
259 stars 67 forks source link

Should I use XRDevice or XRDisplay? #89

Open YoneChen opened 6 years ago

YoneChen commented 6 years ago

I found that the WebXR Device API draft uses requestDevice to get XRDevice: https://immersive-web.github.io/webxr/spec/latest/#xrdevice-interface but the webxr-polyfill hasn't declared XRDevice yet?

speigg commented 6 years ago

The polyfill is a little bit out of date compared to the current spec. I have a branch that is more up-to-date, and can work on a PR if people are interested.

blairmacintyre commented 6 years ago

As @speigg says, the polyfill is based on the experimental API we worked on last year (https://github.com/mozilla/webxr-api). Now that the WebVR community is moving to WebXR, and the new API is being developed, I expect we'll all adapt to the new API when it's done.

Right now, the new API is still not complete, and still being drafted. So, we haven't been updating to follow it.

There have been discussions in the immersive-web community group about the right way to move forward with a polyfill; my current expectation is that a new polyfill will be created, and that will will also shift to using it. We'll figure out how the WebXR Viewer, ArgonXR, and the Google Apps will work with it, but I think that over the next little while we'll sort it out. We may update this polyfill to match the API, for example, or just switch to a new one if it can be made to support all the apps we care about.

So, I don't think it's worth updating this polyfill to follow the API just yet.