mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
Basic XRFrame interface
This commit is contained in:
parent
ebf9ccc9de
commit
29e9672d4d
7 changed files with 154 additions and 0 deletions
12
components/script/dom/webidls/XRFrame.webidl
Normal file
12
components/script/dom/webidls/XRFrame.webidl
Normal 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);
|
||||
};
|
7
components/script/dom/webidls/XRLayer.webidl
Normal file
7
components/script/dom/webidls/XRLayer.webidl
Normal 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 {};
|
41
components/script/dom/webidls/XRWebGLLayer.webidl
Normal file
41
components/script/dom/webidls/XRWebGLLayer.webidl
Normal 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);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue