XRAnchorSet
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
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
js
const trackedAnchors = frame.trackedAnchors;
for (const anchor of previousFrameAnchors) {
if (!trackedAnchors.has(anchor)) {
// Handle anchor tracking loss
}
}
Specifications
| Specification |
|---|
| WebXR Anchors Module # xranchorset |
Browser compatibility
| desktop | mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
XRAnchorSet
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Symbol.iterator]
|
|
|
|
|
|
|
|
|
|
|
|
|
entries
|
|
|
|
|
|
|
|
|
|
|
|
|
forEach
|
|
|
|
|
|
|
|
|
|
|
|
|
has
|
|
|
|
|
|
|
|
|
|
|
|
|
keys
|
|
|
|
|
|
|
|
|
|
|
|
|
size
|
|
|
|
|
|
|
|
|
|
|
|
|
values
|
|
|
|
|
|
|
|
|
|
|
|
|
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.
- See implementation notes.