web api interface
XRCompositionLayer
Secure contextLimited availability
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).
Instance properties
blendTextureSourceAlphaExperimental- : A boolean enabling the layer’s texture alpha channel.
layoutRead only Experimental- : The layout type of the layer.
mipLevelsRead only Experimental- : The number of mip levels in the color and texture data for the layer.
needsRedrawRead only Experimental- : A boolean signaling that the layer should be re-rendered in the next frame.
Instance methods
Inherits methods from its parent, EventTarget.
destroy()Experimental- : Deletes the underlying layer attachments.
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.