Skip to content

Commit

Permalink
update anchor deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
cabanier authored Nov 1, 2022
1 parent 8683ae0 commit 38f0f35
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions anchors.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,10 @@
if (anchoredObjects.length === 0)
return;

let objectToRemove = anchoredObjects.shift();
scene.removeNode(objectToRemove);
let objectToRemove = anchoredObjects[0];
session.deletePersistentAnchor(objectToRemove.anchor.uuid).then(() => {
anchoredObjects.shift();
scene.removeNode(objectToRemove);
console.log("deleted anchor");
let anchors = [];
for (let x = 0; x < anchoredObjects.length; x++) {
Expand Down

0 comments on commit 38f0f35

Please sign in to comment.