Fill in XR frame/pose/view implementations

This commit is contained in:
Manish Goregaokar 2018-12-21 15:20:51 -08:00
parent 7e043a33f1
commit 28dff81dbf
12 changed files with 152 additions and 38 deletions

View file

@ -5,8 +5,8 @@
// https://immersive-web.github.io/webxr/#xrframe-interface
[SecureContext, Exposed=Window] interface XRFrame {
// readonly attribute XRSession session;
readonly attribute XRSession session;
// XRViewerPose? getViewerPose(optional XRReferenceSpace referenceSpace);
XRViewerPose? getViewerPose(optional XRReferenceSpace referenceSpace);
// XRInputPose? getInputPose(XRInputSource inputSource, optional XRReferenceSpace referenceSpace);
};

View file

@ -11,7 +11,7 @@ enum XREye {
[SecureContext, Exposed=Window] interface XRView {
readonly attribute XREye eye;
// readonly attribute Float32Array projectionMatrix;
// readonly attribute Float32Array viewMatrix;
readonly attribute Float32Array projectionMatrix;
readonly attribute Float32Array viewMatrix;
// readonly attribute XRRigidTransform transform;
};

View file

@ -7,4 +7,6 @@
[SecureContext, Exposed=Window] interface XRViewerPose {
// readonly attribute XRRigidTransform transform;
// readonly attribute FrozenArray<XRView> views;
// workaround until we have FrozenArray
sequence<XRView> views();
};