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).

EventTarget XRLayer XRCompositionLayer

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