web api interface
XRWebGLBinding
Secure contextLimited availability
The XRWebGLBinding interface is used to create layers that have a GPU backend.
Constructor
XRWebGLBinding()Experimental- : Creates a new
XRWebGLBindingobject for the specified XR session and WebGL rendering context.
- : Creates a new
Instance properties
nativeProjectionScaleFactorRead only Experimental- : The
scaleFactorthat was passed in during the construction of the projection layer. The native buffer size is scaled by this number.
- : The
Instance methods
createCubeLayer()Experimental- : Returns an
XRCubeLayerobject, which is a layer that renders directly from a cubemap, and projects it onto the inside faces of a cube.
- : Returns an
createCylinderLayer()Experimental- : Returns an
XRCylinderLayerobject which is a layer that takes up a curved rectangular space in the virtual environment.
- : Returns an
createEquirectLayer()Experimental- : Returns an
XREquirectLayerobject which is a layer that maps equirectangular coded data onto the inside of a sphere.
- : Returns an
createProjectionLayer()Experimental- : 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.
- : Returns an
createQuadLayer()Experimental- : Returns an
XRQuadLayerobject which is a two-dimensional object positioned and oriented in 3D space.
- : Returns an
getDepthInformation()Experimental- : Returns an
XRWebGLDepthInformationobject containing WebGL depth information.
- : Returns an
getReflectionCubeMap()Experimental- : Returns a
WebGLTextureobject containing a reflection cube map texture.
- : Returns a
getSubImage()Experimental- : Returns an
XRWebGLSubImageobject representing the WebGL texture to render.
- : Returns an
getViewSubImage()Experimental- : Returns an
XRWebGLSubImageobject representing the WebGL texture to render for anXRView.
- : Returns an
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.