Basic XRFrame interface

This commit is contained in:
Manish Goregaokar 2018-12-19 15:16:01 -08:00
parent ebf9ccc9de
commit 29e9672d4d
7 changed files with 154 additions and 0 deletions

View file

@ -0,0 +1,12 @@
/* 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/#xrframe-interface
[SecureContext, Exposed=Window] interface XRFrame {
// readonly attribute XRSession session;
// XRViewerPose? getViewerPose(optional XRReferenceSpace referenceSpace);
// XRInputPose? getInputPose(XRInputSource inputSource, optional XRReferenceSpace referenceSpace);
};

View file

@ -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/. */
// https://immersive-web.github.io/webxr/#xrlayer-interface
[SecureContext, Exposed=Window] interface XRLayer {};

View file

@ -0,0 +1,41 @@
/* 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/#xrwebgllayer-interface
typedef (WebGLRenderingContext or
WebGL2RenderingContext) XRWebGLRenderingContext;
dictionary XRWebGLLayerInit {
boolean antialias = true;
boolean depth = true;
boolean stencil = false;
boolean alpha = true;
double framebufferScaleFactor = 1.0;
};
[SecureContext, Exposed=Window]
// [Constructor(XRSession session,
// XRWebGLRenderingContext context,
// optional XRWebGLLayerInit layerInit)]
interface XRWebGLLayer : XRLayer {
// // Attributes
// readonly attribute XRWebGLRenderingContext context;
// readonly attribute boolean antialias;
// readonly attribute boolean depth;
// readonly attribute boolean stencil;
// readonly attribute boolean alpha;
// readonly attribute WebGLFramebuffer framebuffer;
// readonly attribute unsigned long framebufferWidth;
// readonly attribute unsigned long framebufferHeight;
// // Methods
// XRViewport? getViewport(XRView view);
// void requestViewportScaling(double viewportScaleFactor);
// // Static Methods
// static double getNativeFramebufferScaleFactor(XRSession session);
};