Definition
WebXR Layers API Level 1 defines XRWebGLBinding
[Exposed=Window] interface XRWebGLBinding {
constructor(XRSession session, XRWebGLRenderingContext context);
readonly attribute double nativeProjectionScaleFactor;
readonly attribute boolean usesDepthValues;
XRProjectionLayer createProjectionLayer(optional XRProjectionLayerInit init = {});
XRQuadLayer createQuadLayer(optional XRQuadLayerInit init = {});
XRCylinderLayer createCylinderLayer(optional XRCylinderLayerInit init = {});
XREquirectLayer createEquirectLayer(optional XREquirectLayerInit init = {});
XRCubeLayer createCubeLayer(optional XRCubeLayerInit init = {});
XRWebGLSubImage getSubImage(XRCompositionLayer layer, XRFrame frame, optional XREye eye = "none");
XRWebGLSubImage getViewSubImage(XRProjectionLayer layer, XRView view);
};
This interface is extended in the following specifications:
- WebXR Raw Camera Access Module
partial interface XRWebGLBinding { WebGLTexture? getCameraImage(XRCamera camera); };
- WebXR Depth Sensing Module
partial interface XRWebGLBinding { XRWebGLDepthInformation? getDepthInformation(XRView view); };
- WebXR Lighting Estimation API Level 1
partial interface XRWebGLBinding { WebGLTexture? getReflectionCubeMap(XRLightProbe lightProbe); };
Consolidated IDL (across mixin and partials)
[Exposed=Window] interface XRWebGLBinding {
constructor(XRSession session, XRWebGLRenderingContext context);
readonly attribute double nativeProjectionScaleFactor;
readonly attribute boolean usesDepthValues;
XRProjectionLayer createProjectionLayer(optional XRProjectionLayerInit init = {});
XRQuadLayer createQuadLayer(optional XRQuadLayerInit init = {});
XRCylinderLayer createCylinderLayer(optional XRCylinderLayerInit init = {});
XREquirectLayer createEquirectLayer(optional XREquirectLayerInit init = {});
XRCubeLayer createCubeLayer(optional XRCubeLayerInit init = {});
XRWebGLSubImage getSubImage(XRCompositionLayer layer, XRFrame frame, optional XREye eye = "none");
XRWebGLSubImage getViewSubImage(XRProjectionLayer layer, XRView view);
WebGLTexture? getCameraImage(XRCamera camera);
XRWebGLDepthInformation? getDepthInformation(XRView view);
WebGLTexture? getReflectionCubeMap(XRLightProbe lightProbe);
};
Methods and attributes that return objects implementing XRWebGLBinding
Referring specifications
- WebXR Raw Camera Access Module refers to
XRWebGLBinding
- WebXR Depth Sensing Module refers to
XRWebGLBinding
- WebXR Lighting Estimation API Level 1 refers to
XRWebGLBinding