immersive-web / webxr-polyfill

Use the WebXR Device API today, providing fallbacks to native WebVR 1.1 and Cardboard
Apache License 2.0
386 stars 86 forks source link

Always support inline sessions #68

Open jsantell opened 5 years ago

jsantell commented 5 years ago

via #65

Currently, a valid "XRDevice" must be generated (out of the box, either backed via WebVR or Cardboard). There are reasons to only support polyfilling inline without immersive-vr (perf overhead of cardboard polyfilling, 270kb for cardboard (#56)), and according to spec should always be supported, which currently can fail for some configurations of cardboard and allowCardboardOnDesktop.

It might make sense to add a new device in src/devices/*, e.g. InlineWebXRDevice which handles this barebones case. Additionally, it seems that this would eliminate the need for the allowCardboardOnDesktop configuration.