files/en-us/web/api/xrquadlayer/index.md
{{securecontext_header}}{{APIRef("WebXR Device API")}}{{SeeCompatTable}}
The XRQuadLayer interface of the WebXR Device API is a layer that takes up a flat rectangular space in the virtual environment. An XRQuadLayer has no thickness. It is a two-dimensional object positioned and oriented in 3D space. The position of a quad refers to the center of the quad. Only the front of the layer is visible.
XRQuadLayer requires the layers feature to be enabled for the {{domxref("XRSession")}}. You can request it in {{domxref("XRSystem.requestSession()")}}.
To create a new XRQuadLayer, call either:
To present layers to the XR device, add them to the layers render state using {{domxref("XRSession.updateRenderState()")}}.
{{InheritanceDiagram}}
Inherits properties from its parent, {{domxref("XRCompositionLayer")}}.
space.Inherits methods from its parents, {{domxref("XRCompositionLayer")}} and {{domxref("EventTarget")}}.
XRQuadLayer object when the underlying resources of the layer are lost or when the XR Compositor can no longer reproject the layer. If this event is sent, authors should redraw the content of the layer in the next XR animation frame.{{Specifications}}
{{Compat}}