XRAnchor: delete() 方法
XRAnchor 接口的 delete() 方法会移除一个锚点。当应用程序不再需要接收锚点的更新时,这会非常有用。
语法
js
delete()
参数
无。
返回值
无(undefined)。
示例
移除所有锚点
js
let anchorsCollection = new Set();
// Upon creating anchors, add them to the Set
// anchorsCollection.add(anchor);
for (const anchor of anchorsCollection) {
anchor.delete();
}
anchorsCollection.clear();
规范
| 规范 |
|---|
| WebXR Anchors 模块 # dom-xranchor-delete |
浏览器兼容性
加载中…