Back to Content

XRFrame: trackedAnchors property

files/en-us/web/api/xrframe/trackedanchors/index.md

latest537 B
Original Source

{{APIRef("WebXR Device API")}}{{SeeCompatTable}}{{SecureContext_Header}}

The read-only trackedAnchor property of the {{domxref("XRFrame")}} interface returns an {{domxref("XRAnchorSet")}} object containing all anchors still tracked in the frame.

Value

An {{domxref("XRAnchorSet")}} object.

Examples

Updating anchors

js
for (const anchor of frame.trackedAnchors) {
  const pose = frame.getPose(anchor.anchorSpace, referenceSpace);
}

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}