XRCompositionLayer: blendTextureSourceAlpha property

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

The blendTextureSourceAlpha property of the XRCompositionLayer interface is a boolean enabling the layer's texture alpha channel.


A boolean. true enables the alpha channel, false disables it.


Setting a layer's texture alpha channel

The following code snippet toggles a layer to opaque and back.

myLayer.blendTextureSourceAlpha = !myLayer.blendTextureSourceAlpha;


WebXR Layers API Level 1
# dom-xrcompositionlayer-blendtexturesourcealpha

Browser compatibility

BCD tables only load in the browser

See also