diff options
author | Alan Jeffrey <ajeffrey@mozilla.com> | 2020-07-31 18:44:57 -0500 |
---|---|---|
committer | Alan Jeffrey <ajeffrey@mozilla.com> | 2020-08-03 12:37:01 -0500 |
commit | bf7f4eae31f0332b0ab8460132c937f8facbed47 (patch) | |
tree | 85ccb6a32b1ae33cada701ca96b47aff19bb477d /components/script/dom/webidls/XRWebGLBinding.webidl | |
parent | 092dcaf2e6ec2ed4bc197991b46addf0752214a7 (diff) | |
download | servo-bf7f4eae31f0332b0ab8460132c937f8facbed47.tar.gz servo-bf7f4eae31f0332b0ab8460132c937f8facbed47.zip |
Update WebXR Layer IDL, and matching changes to the Rust code.
Diffstat (limited to 'components/script/dom/webidls/XRWebGLBinding.webidl')
-rw-r--r-- | components/script/dom/webidls/XRWebGLBinding.webidl | 61 |
1 files changed, 50 insertions, 11 deletions
diff --git a/components/script/dom/webidls/XRWebGLBinding.webidl b/components/script/dom/webidls/XRWebGLBinding.webidl index 08617561b36..c57b59b7afc 100644 --- a/components/script/dom/webidls/XRWebGLBinding.webidl +++ b/components/script/dom/webidls/XRWebGLBinding.webidl @@ -9,14 +9,18 @@ interface XRWebGLBinding { // readonly attribute double nativeProjectionScaleFactor; -// XRProjectionLayer createProjectionLayer(GLenum textureTarget, optional XRProjectionLayerInit init = {}); -// XRQuadLayer createQuadLayer(GLenum textureTarget, XRLayerInit init); -// XRCylinderLayer createCylinderLayer(GLenum textureTarget, XRLayerInit init); -// XREquirectLayer createEquirectLayer(GLenum textureTarget, XRLayerInit init); -// XRCubeLayer createCubeLayer(XRLayerInit init); +// 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); - XRWebGLSubImage? getSubImage(XRLayer layer, XRFrame frame); // for mono layers - XRWebGLSubImage? getViewSubImage(XRLayer layer, XRView view); // for stereo layers +// XRWebGLSubImage getSubImage(XRCompositionLayer layer, XRFrame frame, optional XREye eye = "none"); +// XRWebGLSubImage getViewSubImage(XRProjectionLayer layer, XRView view); }; dictionary XRProjectionLayerInit { @@ -26,19 +30,54 @@ dictionary XRProjectionLayerInit { double scaleFactor = 1.0; }; +dictionary XRQuadLayerInit : XRLayerInit { + XRRigidTransform? transform; + float width = 1.0; + float height = 1.0; + boolean isStatic = false; +}; + +dictionary XRCylinderLayerInit : XRLayerInit { + XRRigidTransform? transform; + float radius = 2.0; + float centralAngle = 0.78539; + float aspectRatio = 2.0; + boolean isStatic = false; +}; + +dictionary XREquirectLayerInit : XRLayerInit { + XRRigidTransform? transform; + float radius = 0; + float centralHorizontalAngle = 6.28318; + float upperVerticalAngle = 1.570795; + float lowerVerticalAngle = -1.570795; + boolean isStatic = false; +}; + +dictionary XRCubeLayerInit : XRLayerInit { + DOMPointReadOnly? orientation; + boolean isStatic = false; +}; + dictionary XRLayerInit { - required unsigned long pixelWidth; - required unsigned long pixelHeight; + required XRSpace space; + required unsigned long viewPixelWidth; + required unsigned long viewPixelHeight; XRLayerLayout layout = "mono"; - boolean depth = false; // This is a change from typical WebGL initialization, but feels appropriate. + boolean depth = false; boolean stencil = false; boolean alpha = true; }; +enum XRTextureType { + "texture", + "texture-array" +}; + enum XRLayerLayout { + "default", "mono", "stereo", "stereo-left-right", "stereo-top-bottom" }; - |