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

Configurable the number of views #142

Open
takahirox opened this issue Feb 26, 2020 · 0 comments
Open

Configurable the number of views #142

takahirox opened this issue Feb 26, 2020 · 0 comments

Comments

@takahirox
Copy link
Contributor

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 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'));
  }
}
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

1 participant