此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

XRFrame:trackedAnchors 属性

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

实验性: 这是一项实验性技术
在将其用于生产之前,请仔细检查浏览器兼容性表格

安全上下文: 此特性仅在一些支持的浏览器安全上下文(HTTPS)中可用。

XRFrame 接口的 trackedAnchor 只读属性返回包含当前帧中仍在跟踪的所有锚点的 XRAnchorSet 对象。

XRAnchorSet 对象。

示例

更新锚点

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

规范

Specification
WebXR Anchors Module
# dom-xrframe-trackedanchors

浏览器兼容性