aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webidls
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/webidls')
-rw-r--r--components/script/dom/webidls/XRReferenceSpace.webidl20
-rw-r--r--components/script/dom/webidls/XRSpace.webidl7
-rw-r--r--components/script/dom/webidls/XRStationaryReferenceSpace.webidl20
3 files changed, 47 insertions, 0 deletions
diff --git a/components/script/dom/webidls/XRReferenceSpace.webidl b/components/script/dom/webidls/XRReferenceSpace.webidl
new file mode 100644
index 00000000000..5b18050dda2
--- /dev/null
+++ b/components/script/dom/webidls/XRReferenceSpace.webidl
@@ -0,0 +1,20 @@
+/* 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/#xrreferencespace-interface
+
+enum XRReferenceSpaceType {
+ "stationary",
+ "bounded",
+ "unbounded"
+};
+
+dictionary XRReferenceSpaceOptions {
+ required XRReferenceSpaceType type;
+};
+
+[SecureContext, Exposed=Window] interface XRReferenceSpace : XRSpace {
+ // attribute XRRigidTransform originOffset;
+ // attribute EventHandler onreset;
+};
diff --git a/components/script/dom/webidls/XRSpace.webidl b/components/script/dom/webidls/XRSpace.webidl
new file mode 100644
index 00000000000..9ad1d399429
--- /dev/null
+++ b/components/script/dom/webidls/XRSpace.webidl
@@ -0,0 +1,7 @@
+/* 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/. */
+
+[SecureContext, Exposed=Window] interface XRSpace : EventTarget {
+ // XRRigidTransform? getTransformTo(XRSpace other);
+}; \ No newline at end of file
diff --git a/components/script/dom/webidls/XRStationaryReferenceSpace.webidl b/components/script/dom/webidls/XRStationaryReferenceSpace.webidl
new file mode 100644
index 00000000000..a6b8954b885
--- /dev/null
+++ b/components/script/dom/webidls/XRStationaryReferenceSpace.webidl
@@ -0,0 +1,20 @@
+/* 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/#xrstationaryreferencespace-interface
+
+enum XRStationaryReferenceSpaceSubtype {
+ "eye-level",
+ "floor-level",
+ "position-disabled"
+};
+
+dictionary XRStationaryReferenceSpaceOptions : XRReferenceSpaceOptions {
+ required XRStationaryReferenceSpaceSubtype subtype;
+};
+
+[SecureContext, Exposed=Window]
+interface XRStationaryReferenceSpace: XRReferenceSpace {
+ // readonly attribute XRStationaryReferenceSpaceSubtype subtype;
+}; \ No newline at end of file