mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Add requestReferenceSpace
This commit is contained in:
parent
f2a6164a52
commit
191fcf66cc
5 changed files with 64 additions and 18 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue