The XRWebGLBinding
interface is used to create layers that have a GPU backend.
Constructor
XRWebGLBinding()
Experimental
-
Creates a new XRWebGLBinding
object for the specified XR session and WebGL rendering context.
Instance properties
XRWebGLBinding.nativeProjectionScaleFactor
Read only Experimental
-
The scaleFactor
that was passed in during the construction of the projection layer. The native buffer size is scaled by this number.
Instance methods
XRWebGLBinding.createCubeLayer()
Experimental
-
Returns an XRCubeLayer
object, which is a layer that renders directly from a cubemap, and projects it onto the inside faces of a cube.
XRWebGLBinding.createCylinderLayer()
Experimental
-
Returns an XRCylinderLayer
object which is a layer that takes up a curved rectangular space in the virtual environment.
XRWebGLBinding.createEquirectLayer()
Experimental
-
Returns an XREquirectLayer
object which is a layer that maps equirectangular coded data onto the inside of a sphere.
XRWebGLBinding.createProjectionLayer()
Experimental
-
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.
XRWebGLBinding.createQuadLayer()
Experimental
-
Returns an XRQuadLayer
object which is a two-dimensional object positioned and oriented in 3D space.
XRWebGLBinding.getDepthInformation()
Experimental
-
Returns an XRWebGLDepthInformation
object containing WebGL depth information.
XRWebGLBinding.getReflectionCubeMap()
Experimental
-
Returns a WebGLTexture
object containing a reflection cube map texture.
XRWebGLBinding.getSubImage()
Experimental
-
Returns an XRWebGLSubImage
object representing the WebGL texture to render.
XRWebGLBinding.getViewSubImage()
Experimental
-
Returns an XRWebGLSubImage
object representing the WebGL texture to render for an XRView
.
Specifications
Browser compatibility
|
Desktop |
Mobile |
|
Chrome |
Edge |
Firefox |
Internet Explorer |
Opera |
Safari |
WebView Android |
Chrome Android |
Firefox for Android |
Opera Android |
Safari on IOS |
Samsung Internet |
XRWebGLBinding |
89 |
89 |
No |
No |
75 |
No |
No |
89 |
No |
63 |
No |
15.0 |
XRWebGLBinding |
89 |
89 |
No |
No |
75 |
No |
No |
89 |
No |
63 |
No |
15.0 |
createCubeLayer |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
createCylinderLayer |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
createEquirectLayer |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
createProjectionLayer |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
createQuadLayer |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
getCameraImage |
107 |
107 |
No |
No |
No |
No |
No |
107 |
No |
73 |
No |
21.0 |
getDepthInformation |
90 |
90 |
No |
No |
76 |
No |
No |
90 |
No |
64 |
No |
15.0 |
getReflectionCubeMap |
90 |
90 |
No |
No |
76 |
No |
No |
90 |
No |
64 |
No |
15.0 |
getSubImage |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
getViewSubImage |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
nativeProjectionScaleFactor |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
See also