-
Notifications
You must be signed in to change notification settings - Fork 22.5k
/
index.md
39 lines (25 loc) · 926 Bytes
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
title: "XRCompositionLayer: blendTextureSourceAlpha property"
short-title: blendTextureSourceAlpha
slug: Web/API/XRCompositionLayer/blendTextureSourceAlpha
page-type: web-api-instance-property
status:
- experimental
browser-compat: api.XRCompositionLayer.blendTextureSourceAlpha
---
{{APIRef("WebXR Device API")}}{{SeeCompatTable}}
The **`blendTextureSourceAlpha`** property of the {{domxref("XRCompositionLayer")}} interface is a boolean enabling the layer's texture {{Glossary("Alpha", "alpha channel")}}.
## Value
A boolean. `true` enables the alpha channel, `false` disables it.
## Examples
### Setting a layer's texture alpha channel
The following code snippet toggles a layer to opaque and back.
```js
myLayer.blendTextureSourceAlpha = !myLayer.blendTextureSourceAlpha;
```
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- {{Glossary("Alpha", "Alpha channel")}}