XRCompositionLayer

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The XRCompositionLayer interface of the WebXR Device API is a base class that defines a set of common properties and behaviors for WebXR layer types. It is not constructable on its own.

Several layer types inherit from XRCompositionLayer:

XRCompositionLayer itself inherits from the general XRLayer class (which inherits from EventTarget).

Properties

XRCompositionLayer.blendTextureSourceAlpha

A boolean enabling the layer's texture alpha channel.

XRCompositionLayer.chromaticAberrationCorrection

A boolean enabling optical chromatic aberration correction for the layer if the device supports it, null otherwise.

XRCompositionLayer.layout Read only

The layout type of the layer.

XRCompositionLayer.mipLevels Read only

The number of mip levels in the color and texture data for the layer.

XRCompositionLayer.needsRedraw Read only

A boolean signaling that the layer should be rerendered in the next frame.

Methods

Inherits methods from its parent, EventTarget.

XRCompositionLayer.destroy()

Deletes the underlying layer attachments.

Specifications

No specification found

No specification data found for api.XRCompositionLayer.
Check for problems with this page or contribute a missing spec_url to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

Browser compatibility

No compatibility data found for api.XRCompositionLayer.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.

See also

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/XRCompositionLayer