XRCompositionLayer: destroy() method

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Phương thức destroy() của giao diện XRCompositionLayer xóa các tham chiếu đến thư viện đồ họa bên dưới cho layer. Nó cũng đặt mảng texture màu sắc và mảng texture depth stencil thành mảng rỗng.

Cú pháp

js
destroy()

Tham số

Không có.

Giá trị trả về

Không có (undefined).

Ví dụ

Xóa một layer

Gọi destroy() để xóa một layer.

js
myLayer.destroy();

Thông số kỹ thuật

Specification
WebXR Layers API Level 1
# dom-xrcompositionlayer-destroy

Tương thích trình duyệt