Add requestReferenceSpace

This commit is contained in:
Manish Goregaokar 2019-03-15 10:11:05 -07:00
parent f2a6164a52
commit 191fcf66cc
5 changed files with 64 additions and 18 deletions

View file

@ -4,16 +4,6 @@
// https://immersive-web.github.io/webxr/#xrreferencespace-interface
enum XRReferenceSpaceType {
"stationary",
"bounded",
"unbounded"
};
dictionary XRReferenceSpaceOptions {
required XRReferenceSpaceType type;
};
[SecureContext, Exposed=Window, Pref="dom.webxr.enabled"]
interface XRReferenceSpace : XRSpace {
attribute XRRigidTransform originOffset;

View file

@ -24,8 +24,7 @@ interface XRSession : EventTarget {
attribute XRLayer? baseLayer;
// // Methods
// Promise<XRReferenceSpace> requestReferenceSpace(XRReferenceSpaceType type,
// optional XRReferenceSpaceOptions options);
Promise<XRReferenceSpace> requestReferenceSpace(XRReferenceSpaceOptions options);
// FrozenArray<XRInputSource> getInputSources();
@ -43,3 +42,15 @@ interface XRSession : EventTarget {
// attribute EventHandler onselectstart;
// attribute EventHandler onselectend;
};
enum XRReferenceSpaceType {
"identity",
"stationary",
"bounded",
"unbounded"
};
dictionary XRReferenceSpaceOptions {
required XRReferenceSpaceType type;
XRStationaryReferenceSpaceSubtype subtype;
};

View file

@ -10,10 +10,6 @@ enum XRStationaryReferenceSpaceSubtype {
"position-disabled"
};
dictionary XRStationaryReferenceSpaceOptions : XRReferenceSpaceOptions {
required XRStationaryReferenceSpaceSubtype subtype;
};
[SecureContext, Exposed=Window, Pref="dom.webxr.enabled"]
interface XRStationaryReferenceSpace: XRReferenceSpace {
// readonly attribute XRStationaryReferenceSpaceSubtype subtype;