files/en-us/web/api/xrspace/index.md
{{SecureContext_Header}}{{APIRef("WebXR Device API")}}
The XRSpace interface of the WebXR Device API is an abstract interface providing a common basis for every class which represents a virtual coordinate system within the virtual world, in which its origin corresponds to a physical location. Spatial data in WebXR is always expressed relative to an object based upon one of the descendant interfaces of XRSpace, at the time at which a given {{domxref("XRFrame")}} takes place.
Numeric values such as pose positions are thus coordinates in the corresponding XRSpace, relative to that space's origin.
[!NOTE] The
XRSpaceinterface is never used directly; instead, all spaces are created using one of the interfaces based onXRSpace. At this time, those are {{domxref("XRReferenceSpace")}}, {{domxref("XRBoundedReferenceSpace")}}, and {{domxref("XRJointSpace")}}.
{{InheritanceDiagram}}
Below is a list of interfaces based on the XRSpace interface.
XRBoundedReferenceSpace is always at floor level, with its X and Z coordinates typically defaulting to a location near the room's center.XRReferenceSpace may move in order to adjust based on reconfiguration of the user's headset or other motion-sensitive device.The XRSpace interface defines no properties of its own; however, it does inherit the properties of its parent interface, {{domxref("EventTarget")}}.
The XRSpace interface provides no methods of its own. However, it inherits the methods of {{domxref("EventTarget")}}, its parent interface.
{{Specifications}}
{{Compat}}