WebXR Device API
The XRAnchorSet interface exposes a collection of anchors. Its instances are returned by XRFrame.trackedAnchors and are Set-like objects.
Instance properties
See Set for details.
Instance methods
See Set for details.
Examples
Handling anchor tracking loss
const trackedAnchors = frame.trackedAnchors;
for (const anchor of previousFrameAnchors) {
if (!trackedAnchors.has(anchor)) {
// Handle anchor tracking loss
}
}
Specifications
Browser compatibility
See also
- XRAnchor
- XRFrame.trackedAnchors
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
