XRWebGLBinding

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The XRWebGLBinding interface is used to create layers that have a GPU backend.

Constructor

XRWebGLBinding()

Creates a new XRWebGLBinding object for the specified XR session and WebGL rendering context.

Properties

XRWebGLBinding.nativeProjectionScaleFactor Read only

The scaleFactor that was passed in during the construction of the projection layer. The native buffer size is scaled by this number.

Methods

XRWebGLBinding.createProjectionLayer()

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.getDepthInformation()

Returns an XRWebGLDepthInformation object containing WebGL depth information.

XRWebGLBinding.getReflectionCubeMap()

Returns a WebGLTexture object containing a reflection cube map texture.

XRWebGLBinding.getSubImage()

Returns an XRWebGLSubImage object representing the WebGL texture to render.

XRWebGLBinding.getViewSubImage()

Returns an XRWebGLSubImage object representing the WebGL texture to render for an XRView.

Specifications

Specification
WebXR Layers API Level 1 (WebXR Layers API 1)
# XRWebGLBindingtype

Browser compatibility

BCD tables only load in the browser

See also