XRCompositionLayer: blendTextureSourceAlpha property

Khả dụng hạn chế

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.

Thuộc tính blendTextureSourceAlpha của giao diện XRCompositionLayer là một giá trị boolean cho phép kênh alpha texture của layer.

Giá trị

Một giá trị boolean. true bật kênh alpha, false tắt nó.

Ví dụ

Đặt kênh alpha texture của layer

Đoạn code sau chuyển đổi layer giữa không trong suốt và ngược lại.

js
myLayer.blendTextureSourceAlpha = !myLayer.blendTextureSourceAlpha;

Thông số kỹ thuật

Thông số kỹ thuật
WebXR Layers API Level 1
# dom-xrcompositionlayer-blendtexturesourcealpha

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

Xem thêm