files/en-us/web/api/xrframe/index.md
{{APIRef("WebXR Device API")}}{{SecureContext_Header}}{{SeeCompatTable}}
A WebXR Device API XRFrame object is passed into the {{domxref("XRSession.requestAnimationFrame", "requestAnimationFrame()")}} callback function and provides access to the information needed in order to render a single frame of animation for an {{domxref("XRSession")}} describing a VR or AR scene. Events which communicate the tracking state of objects also provide an XRFrame reference as part of their structure.
In addition to providing a reference to the {{domxref("XRSession")}} for which this frame is to be rendered, the {{domxref("XRFrame.getViewerPose", "getViewerPose()")}} method is provided to obtain the {{domxref("XRViewerPose")}} describing the viewer's position and orientation in space, and {{domxref("XRFrame.getPose", "getPose()")}} can be used to create an {{domxref("XRPose")}} describing the relative position of one {{domxref("XRSpace")}} relative to another.
XRFrame describes the tracking details for all objects. The information about a specific object can be obtained by calling one of the methods on the object.true if successful for all spaces.true if all spaces have a valid pose.{{Specifications}}
{{Compat}}