XRWebGLBinding
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The XRWebGLBinding interface is used to create layers that have a GPU backend.
Constructor
XRWebGLBinding()-
Creates a new
XRWebGLBindingobject for the specified XR session and WebGL rendering context.
Instance properties
XRWebGLBinding.nativeProjectionScaleFactorRead only-
The
scaleFactorthat was passed in during the construction of the projection layer. The native buffer size is scaled by this number.
Instance methods
XRWebGLBinding.createCubeLayer()-
Returns an
XRCubeLayerobject, which is a layer that renders directly from a cubemap, and projects it onto the inside faces of a cube. XRWebGLBinding.createCylinderLayer()-
Returns an
XRCylinderLayerobject which is a layer that takes up a curved rectangular space in the virtual environment. XRWebGLBinding.createEquirectLayer()-
Returns an
XREquirectLayerobject which is a layer that maps equirectangular coded data onto the inside of a sphere. XRWebGLBinding.createProjectionLayer()-
Returns an
XRProjectionLayerobject which is a layer that fills the entire view of the observer and is refreshed close to the device's native frame rate. XRWebGLBinding.createQuadLayer()-
Returns an
XRQuadLayerobject which is a two-dimensional object positioned and oriented in 3D space. XRWebGLBinding.getDepthInformation()-
Returns an
XRWebGLDepthInformationobject containing WebGL depth information. XRWebGLBinding.getReflectionCubeMap()-
Returns a
WebGLTextureobject containing a reflection cube map texture. XRWebGLBinding.getSubImage()-
Returns an
XRWebGLSubImageobject representing the WebGL texture to render. XRWebGLBinding.getViewSubImage()-
Returns an
XRWebGLSubImageobject representing the WebGL texture to render for anXRView.
Specifications
| Specification |
|---|
| WebXR Layers API Level 1 # XRWebGLBindingtype |
Browser compatibility
| desktop | mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
XRWebGLBinding
|
|
|
|
|
|
|
|
|
|
|
|
|
XRWebGLBinding() constructor
|
|
|
|
|
|
|
|
|
|
|
|
|
createCubeLayer
|
|
|
|
|
|
|
|
|
|
|
|
|
createCylinderLayer
|
|
|
|
|
|
|
|
|
|
|
|
|
createEquirectLayer
|
|
|
|
|
|
|
|
|
|
|
|
|
createProjectionLayer
|
|
|
|
|
|
|
|
|
|
|
|
|
createQuadLayer
|
|
|
|
|
|
|
|
|
|
|
|
|
foveateBoundTexture
|
|
|
|
|
|
|
|
|
|
|
|
|
getCameraImage
|
|
|
|
|
|
|
|
|
|
|
|
|
getDepthInformation
|
|
|
|
|
|
|
|
|
|
|
|
|
getReflectionCubeMap
|
|
|
|
|
|
|
|
|
|
|
|
|
getSubImage
|
|
|
|
|
|
|
|
|
|
|
|
|
getViewSubImage
|
|
|
|
|
|
|
|
|
|
|
|
|
nativeProjectionScaleFactor
|
|
|
|
|
|
|
|
|
|
|
|
|
usesDepthValues
|
|
|
|
|
|
|
|
|
|
|
|
|
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.