web api instance method
XRCompositionLayer: destroy() method
Limited availability
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
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.