MDN self-hosted library · e01.org

XRCompositionLayer: destroy() method

WebXR Device API

WebXR Device API

The destroy() method of the XRCompositionLayer interface deletes the references to the underlying graphics library for the layer. It also sets the color textures and depth stencil texture arrays to an empty array.

Syntax

destroy()

Parameters

None.

Return value

None (undefined).

Examples

Deleting a layer

Call destroy() to delete a layer.

myLayer.destroy();

Specifications

Browser compatibility