mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Add a dummy implementation of all the XR Layer types
This commit is contained in:
parent
754019f6bc
commit
d255dc9f7b
18 changed files with 337 additions and 85 deletions
20
components/script/dom/webidls/XRCompositionLayer.webidl
Normal file
20
components/script/dom/webidls/XRCompositionLayer.webidl
Normal file
|
@ -0,0 +1,20 @@
|
|||
/* 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/. */
|
||||
|
||||
// TODO: Implement the layer types
|
||||
// https://github.com/servo/servo/issues/27493
|
||||
|
||||
// https://immersive-web.github.io/layers/#xrcompositionlayer
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
interface XRCompositionLayer : XRLayer {
|
||||
// readonly attribute XRLayerLayout layout;
|
||||
//
|
||||
// attribute boolean blendTextureSourceAlpha;
|
||||
// attribute boolean? chromaticAberrationCorrection;
|
||||
// attribute float? fixedFoveation;
|
||||
//
|
||||
// readonly attribute boolean needsRedraw;
|
||||
//
|
||||
// void destroy();
|
||||
};
|
17
components/script/dom/webidls/XRCubeLayer.webidl
Normal file
17
components/script/dom/webidls/XRCubeLayer.webidl
Normal file
|
@ -0,0 +1,17 @@
|
|||
/* 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/. */
|
||||
|
||||
// TODO: Implement the layer types
|
||||
// https://github.com/servo/servo/issues/27493
|
||||
|
||||
// https://immersive-web.github.io/layers/#xrcubelayer
|
||||
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
interface XRCubeLayer : XRCompositionLayer {
|
||||
// attribute XRSpace space;
|
||||
// attribute DOMPointReadOnly orientation;
|
||||
//
|
||||
// // Events
|
||||
// attribute EventHandler onredraw;
|
||||
};
|
20
components/script/dom/webidls/XRCylinderLayer.webidl
Normal file
20
components/script/dom/webidls/XRCylinderLayer.webidl
Normal file
|
@ -0,0 +1,20 @@
|
|||
/* 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/. */
|
||||
|
||||
// TODO: Implement the layer types
|
||||
// https://github.com/servo/servo/issues/27493
|
||||
|
||||
// https://immersive-web.github.io/layers/#xrcylinderlayer
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
interface XRCylinderLayer : XRCompositionLayer {
|
||||
// attribute XRSpace space;
|
||||
// attribute XRRigidTransform transform;
|
||||
//
|
||||
// attribute float radius;
|
||||
// attribute float centralAngle;
|
||||
// attribute float aspectRatio;
|
||||
//
|
||||
// // Events
|
||||
// attribute EventHandler onredraw;
|
||||
};
|
21
components/script/dom/webidls/XREquirectLayer.webidl
Normal file
21
components/script/dom/webidls/XREquirectLayer.webidl
Normal file
|
@ -0,0 +1,21 @@
|
|||
/* 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/. */
|
||||
|
||||
// TODO: Implement the layer types
|
||||
// https://github.com/servo/servo/issues/27493
|
||||
|
||||
// https://immersive-web.github.io/layers/#xrequirectlayer
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
interface XREquirectLayer : XRCompositionLayer {
|
||||
// attribute XRSpace space;
|
||||
// attribute XRRigidTransform transform;
|
||||
//
|
||||
// attribute float radius;
|
||||
// attribute float centralHorizontalAngle;
|
||||
// attribute float upperVerticalAngle;
|
||||
// attribute float lowerVerticalAngle;
|
||||
//
|
||||
// // Events
|
||||
// attribute EventHandler onredraw;
|
||||
};
|
|
@ -5,71 +5,3 @@
|
|||
// https://immersive-web.github.io/webxr/#xrlayer
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.enabled"]
|
||||
interface XRLayer : EventTarget {};
|
||||
|
||||
// TODO: Implement the layer types
|
||||
//
|
||||
// [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
// interface XRCompositionLayer : XRLayer {
|
||||
// readonly attribute XRLayerLayout layout;
|
||||
//
|
||||
// attribute boolean blendTextureSourceAlpha;
|
||||
// attribute boolean? chromaticAberrationCorrection;
|
||||
// attribute float? fixedFoveation;
|
||||
//
|
||||
// readonly attribute boolean needsRedraw;
|
||||
//
|
||||
// void destroy();
|
||||
// };
|
||||
//
|
||||
// [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
// interface XRProjectionLayer : XRCompositionLayer {
|
||||
// readonly attribute boolean ignoreDepthValues;
|
||||
// };
|
||||
//
|
||||
// [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
// interface XRQuadLayer : XRCompositionLayer {
|
||||
// attribute XRSpace space;
|
||||
// attribute XRRigidTransform transform;
|
||||
//
|
||||
// attribute float width;
|
||||
// attribute float height;
|
||||
//
|
||||
// // Events
|
||||
// attribute EventHandler onredraw;
|
||||
// };
|
||||
//
|
||||
// [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
// interface XRCylinderLayer : XRCompositionLayer {
|
||||
// attribute XRSpace space;
|
||||
// attribute XRRigidTransform transform;
|
||||
//
|
||||
// attribute float radius;
|
||||
// attribute float centralAngle;
|
||||
// attribute float aspectRatio;
|
||||
//
|
||||
// // Events
|
||||
// attribute EventHandler onredraw;
|
||||
// };
|
||||
//
|
||||
// [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
// interface XREquirectLayer : XRCompositionLayer {
|
||||
// attribute XRSpace space;
|
||||
// attribute XRRigidTransform transform;
|
||||
//
|
||||
// attribute float radius;
|
||||
// attribute float centralHorizontalAngle;
|
||||
// attribute float upperVerticalAngle;
|
||||
// attribute float lowerVerticalAngle;
|
||||
//
|
||||
// // Events
|
||||
// attribute EventHandler onredraw;
|
||||
// };
|
||||
//
|
||||
// [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
// interface XRCubeLayer : XRCompositionLayer {
|
||||
// attribute XRSpace space;
|
||||
// attribute DOMPointReadOnly orientation;
|
||||
//
|
||||
// // Events
|
||||
// attribute EventHandler onredraw;
|
||||
// };
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
// https://immersive-web.github.io/layers/#xrmediabindingtype
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
interface XRMediaBinding {
|
||||
constructor(XRSession session);
|
||||
[Throws] constructor(XRSession session);
|
||||
|
||||
// XRQuadLayer createQuadVideoLayer(HTMLVideoElement video, optional XRMediaLayerInit init = {});
|
||||
// XRCylinderLayer createCylinderVideoLayer(HTMLVideoElement video, optional XRMediaLayerInit init = {});
|
||||
// XREquirectLayer createEquirectVideoLayer(HTMLVideoElement video, optional XRMediaLayerInit init = {});
|
||||
[Throws] XRQuadLayer createQuadLayer(HTMLVideoElement video, XRMediaLayerInit init);
|
||||
[Throws] XRCylinderLayer createCylinderLayer(HTMLVideoElement video, XRMediaLayerInit init);
|
||||
[Throws] XREquirectLayer createEquirectLayer(HTMLVideoElement video, XRMediaLayerInit init);
|
||||
};
|
||||
|
||||
dictionary XRMediaLayerInit {
|
||||
|
|
12
components/script/dom/webidls/XRProjectionLayer.webidl
Normal file
12
components/script/dom/webidls/XRProjectionLayer.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/. */
|
||||
|
||||
// TODO: Implement the layer types
|
||||
// https://github.com/servo/servo/issues/27493
|
||||
|
||||
// https://immersive-web.github.io/layers/#xrprojectionlayer
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
interface XRProjectionLayer : XRCompositionLayer {
|
||||
// readonly attribute boolean ignoreDepthValues;
|
||||
};
|
19
components/script/dom/webidls/XRQuadLayer.webidl
Normal file
19
components/script/dom/webidls/XRQuadLayer.webidl
Normal file
|
@ -0,0 +1,19 @@
|
|||
/* 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/. */
|
||||
|
||||
// TODO: Implement the layer types
|
||||
// https://github.com/servo/servo/issues/27493
|
||||
|
||||
// https://immersive-web.github.io/layers/#xrquadlayer
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
interface XRQuadLayer : XRCompositionLayer {
|
||||
// attribute XRSpace space;
|
||||
// attribute XRRigidTransform transform;
|
||||
//
|
||||
// attribute float width;
|
||||
// attribute float height;
|
||||
//
|
||||
// // Events
|
||||
// attribute EventHandler onredraw;
|
||||
};
|
|
@ -9,18 +9,18 @@ interface XRWebGLBinding {
|
|||
|
||||
// readonly attribute double nativeProjectionScaleFactor;
|
||||
|
||||
// XRProjectionLayer createProjectionLayer(XRTextureType textureType,
|
||||
// optional XRProjectionLayerInit init);
|
||||
// XRQuadLayer createQuadLayer(XRTextureType textureType,
|
||||
// optional XRQuadLayerInit init);
|
||||
// XRCylinderLayer createCylinderLayer(XRTextureType textureType,
|
||||
// optional XRCylinderLayerInit init);
|
||||
// XREquirectLayer createEquirectLayer(XRTextureType textureType,
|
||||
// optional XREquirectLayerInit init);
|
||||
// XRCubeLayer createCubeLayer(optional XRCubeLayerInit init);
|
||||
[Throws] XRProjectionLayer createProjectionLayer(XRTextureType textureType,
|
||||
optional XRProjectionLayerInit init = {});
|
||||
[Throws] XRQuadLayer createQuadLayer(XRTextureType textureType,
|
||||
optional XRQuadLayerInit init);
|
||||
[Throws] XRCylinderLayer createCylinderLayer(XRTextureType textureType,
|
||||
optional XRCylinderLayerInit init);
|
||||
[Throws] XREquirectLayer createEquirectLayer(XRTextureType textureType,
|
||||
optional XREquirectLayerInit init);
|
||||
[Throws] XRCubeLayer createCubeLayer(optional XRCubeLayerInit init);
|
||||
|
||||
// XRWebGLSubImage getSubImage(XRCompositionLayer layer, XRFrame frame, optional XREye eye = "none");
|
||||
// XRWebGLSubImage getViewSubImage(XRProjectionLayer layer, XRView view);
|
||||
[Throws] XRWebGLSubImage getSubImage(XRCompositionLayer layer, XRFrame frame, optional XREye eye = "none");
|
||||
[Throws] XRWebGLSubImage getViewSubImage(XRProjectionLayer layer, XRView view);
|
||||
};
|
||||
|
||||
dictionary XRProjectionLayerInit {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue