Class XRWebGLBinding
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalXRWebGLBinding interface is used to create layers that have a GPU backend.
[Value("XRWebGLBinding")]
public class XRWebGLBinding
- Inheritance
-
XRWebGLBinding
- Inherited Members
Remarks
-XRWebGLLayer
-'WebGLRenderingContext' and WebGL2RenderingContext
Constructors
XRWebGLBinding()
public XRWebGLBinding()
XRWebGLBinding(XRSession, Union235)
public XRWebGLBinding(XRSession session, Union235 context)
Parameters
Remarks
-WebGLRenderingContext.MakeXRCompatible
Properties
NativeProjectionScaleFactor
NOTE
ExperimentalnativeProjectionScaleFactor property of the XRWebGLBinding interface represents the scaling factor by which the projection layer's resolution is multiplied by to get the native resolution of the WebXR device's frame buffer.
[Value("nativeProjectionScaleFactor")]
public Number NativeProjectionScaleFactor { get; }
Property Value
- Number
A floating-point number representing by how much the device's native frame buffer size is scaled by.
Remarks
For more details, see GetNativeFramebufferScaleFactor(XRSession).
UsesDepthValues
[Value("usesDepthValues")]
public bool UsesDepthValues { get; }
Property Value
Methods
CreateCubeLayer(XRCubeLayerInit)
NOTE
ExperimentalcreateCubeLayer() method of the XRWebGLBinding interface returns an XRCubeLayer object, which is a layer that renders directly from a cubemap, and projects it onto the inside faces of a cube.
[Value("createCubeLayer")]
public XRCubeLayer CreateCubeLayer(XRCubeLayerInit init = null)
Parameters
initXRCubeLayerInit
Returns
- XRCubeLayer
An XRCubeLayer object.
Remarks
CreateCylinderLayer(XRCylinderLayerInit)
NOTE
ExperimentalcreateCylinderLayer() method of the XRWebGLBinding interface returns an XRCylinderLayer object, which is a layer that takes up a curved rectangular space in the virtual environment.
[Value("createCylinderLayer")]
public XRCylinderLayer CreateCylinderLayer(XRCylinderLayerInit init = null)
Parameters
initXRCylinderLayerInit
Returns
- XRCylinderLayer
An XRCylinderLayer object.
Remarks
CreateEquirectLayer(XREquirectLayerInit)
NOTE
ExperimentalcreateEquirectLayer() method of the XRWebGLBinding interface returns an XREquirectLayer object, which is a layer that maps equirectangular coded data onto the inside of a sphere.
[Value("createEquirectLayer")]
public XREquirectLayer CreateEquirectLayer(XREquirectLayerInit init = null)
Parameters
initXREquirectLayerInit
Returns
- XREquirectLayer
An XREquirectLayer object.
Remarks
CreateProjectionLayer(XRProjectionLayerInit)
NOTE
ExperimentalcreateProjectionLayer() method of the XRWebGLBinding interface returns an XRProjectionLayer object which is a layer that fills the entire view of the observer and is refreshed close to the device's native frame rate.
[Value("createProjectionLayer")]
public XRProjectionLayer CreateProjectionLayer(XRProjectionLayerInit init = null)
Parameters
Returns
- XRProjectionLayer
An XRProjectionLayer object.
Remarks
CreateQuadLayer(XRQuadLayerInit)
NOTE
ExperimentalcreateQuadLayer() method of the XRWebGLBinding interface returns an XRQuadLayer object which is a layer that takes up a flat rectangular space in the virtual environment.
[Value("createQuadLayer")]
public XRQuadLayer CreateQuadLayer(XRQuadLayerInit init = null)
Parameters
initXRQuadLayerInit
Returns
- XRQuadLayer
An XRQuadLayer object.
Remarks
GetCameraImage(XRCamera)
[Value("getCameraImage")]
public WebGLTexture? GetCameraImage(XRCamera camera)
Parameters
cameraXRCamera
Returns
GetDepthInformation(XRView)
NOTE
ExperimentalgetDepthInformation() method of the XRWebGLBinding interface returns an XRWebGLDepthInformation object containing WebGL depth information.
[Value("getDepthInformation")]
public XRWebGLDepthInformation? GetDepthInformation(XRView view)
Parameters
viewXRView
Returns
- XRWebGLDepthInformation
An XRWebGLDepthInformation object.
Remarks
GetReflectionCubeMap(XRLightProbe)
NOTE
ExperimentalgetReflectionCubeMap() method of the XRWebGLBinding interface returns a WebGLTexture object containing a reflection cube map texture.
[Value("getReflectionCubeMap")]
public WebGLTexture? GetReflectionCubeMap(XRLightProbe lightProbe)
Parameters
lightProbeXRLightProbe
Returns
- WebGLTexture
A WebGLTexture object.
Remarks
The texture format is specified by the session's reflectionFormat. See the options parameter on RequestLightProbe(XRLightProbeInit) and PreferredReflectionFormat for more details. By default, the srgba8 format is used. When using a rgba16f format, you need to be within a WebGL 2.0 context or enable the OES_texture_half_float extension within WebGL 1.0 contexts.
GetSubImage(XRCompositionLayer, XRFrame, XREye)
NOTE
ExperimentalgetSubImage() method of the XRWebGLBinding interface returns a XRWebGLSubImage object representing the WebGL texture to render.
[Value("getSubImage")]
public XRWebGLSubImage GetSubImage(XRCompositionLayer layer, XRFrame frame, XREye eye = XREye.None)
Parameters
layerXRCompositionLayerframeXRFrameeyeXREye
Returns
- XRWebGLSubImage
A XRWebGLSubImage object.
Remarks
GetViewSubImage(XRProjectionLayer, XRView)
NOTE
ExperimentalgetViewSubImage() method of the XRWebGLBinding interface returns a XRWebGLSubImage object representing the WebGL texture to render for a view.
[Value("getViewSubImage")]
public XRWebGLSubImage GetViewSubImage(XRProjectionLayer layer, XRView view)
Parameters
layerXRProjectionLayerviewXRView
Returns
- XRWebGLSubImage
A XRWebGLSubImage object.