I faced a problem while I'm trying to add AR support to the extension. I want to emulate monoscopic AR device (eg. Android phone) but XRSession constructor defines two views left and right for immersive-session (mode != 'inline') although I want one 'none' view.
So I want to suggest that we make the number of views configurable depending on device. For example XRSession constructor takes device argument so we may add a method or property to XRDevice which creates (or defines) view spaces.
device.initViewSpaces(this[PRIVATE].viewSpaces);
if (this[PRIVATE].viewSpaces.length === 0) {
if (immersive) {
this[PRIVATE].viewSpaces.push(new XRViewSpace('left'), new XRViewSpace('right'));
} else {
this[PRIVATE].viewSpaces.push(new XRViewSpace('none'));
}
}
Hi. I've been making WebXR emulator extension on top of
webxr-polyfill.js
.I faced a problem while I'm trying to add AR support to the extension. I want to emulate monoscopic AR device (eg. Android phone) but
XRSession
constructor defines two views left and right for immersive-session (mode != 'inline') although I want one 'none' view.So I want to suggest that we make the number of views configurable depending on device. For example
XRSession
constructor takesdevice
argument so we may add a method or property toXRDevice
which creates (or defines) view spaces.