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 |
瀏覽器相容性
載入中…