diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-01-04 02:54:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-04 02:54:16 -0500 |
commit | c4a6dcfe4bd5f5613cee3596e68a1eb7a97bd32e (patch) | |
tree | b111aaba4a6168c35a71132254d94f5e4f1ab68e /components/script/dom/webidls/XRView.webidl | |
parent | c6f6fb697d09513a51cdba4077c9ea78dba8afa7 (diff) | |
parent | e544462b6c4732987c5c8154d4a4e33539e83d13 (diff) | |
download | servo-c4a6dcfe4bd5f5613cee3596e68a1eb7a97bd32e.tar.gz servo-c4a6dcfe4bd5f5613cee3596e68a1eb7a97bd32e.zip |
Auto merge of #22528 - Manishearth:webxr, r=jdm,MortimerGoro
Preliminary WebXR support
This implements just enough WebXR to display to 3DOF devices in
immersive mode only.
Couple missing things:
- [ ] Handling reference spaces (even if just supporting eye-level spaces)
- [x] Spec links
- [ ] We enter immersive mode when baseLayer is set, but it seems like
we're supposed to do this when requestSession is called (https://github.com/immersive-web/webxr/issues/453)
- [ ] VR/XR should block less (https://github.com/servo/servo/issues/22505)
- [x] More pref-gating
- [x] `views` is a method instead of an attribute because we don't support FrozenArray
<s>Once I add spec links and pref gating</s> this can be landed as-is for further experimentation.
r? @jdm @MortimerGoro
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22528)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/webidls/XRView.webidl')
-rw-r--r-- | components/script/dom/webidls/XRView.webidl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/components/script/dom/webidls/XRView.webidl b/components/script/dom/webidls/XRView.webidl new file mode 100644 index 00000000000..ab81136c28d --- /dev/null +++ b/components/script/dom/webidls/XRView.webidl @@ -0,0 +1,18 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +// https://immersive-web.github.io/webxr/#xrview-interface + +enum XREye { + "left", + "right" +}; + +[SecureContext, Exposed=Window, Pref="dom.webxr.enabled"] +interface XRView { + readonly attribute XREye eye; + readonly attribute Float32Array projectionMatrix; + readonly attribute Float32Array viewMatrix; + // readonly attribute XRRigidTransform transform; +}; |