XRAnchorSet
The XRAnchorSet
interface exposes a collection of anchors. It is returned by XRFrame.trackedAnchors
and is a Set
-like object.
Properties
See Set
for details.
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
Specification |
---|
WebXR Anchors Module (WebXR Anchors) # xranchorset |
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
XRAnchorSet |
85 |
85 |
No |
No |
No |
No |
No |
85 |
No |
No |
No |
No |
entries |
85 |
85 |
No |
No |
No |
No |
No |
85 |
No |
No |
No |
No |
forEach |
85 |
85 |
No |
No |
No |
No |
No |
85 |
No |
No |
No |
No |
has |
85 |
85 |
No |
No |
No |
No |
No |
85 |
No |
No |
No |
No |
keys |
85 |
85 |
No |
No |
No |
No |
No |
85 |
No |
No |
No |
No |
size |
85 |
85 |
No |
No |
No |
No |
No |
85 |
No |
No |
No |
No |
values |
85 |
85 |
No |
No |
No |
No |
No |
85 |
No |
No |
No |
No |
See also
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/XRAnchorSet