A spatial anchor represents a fixed point in the physical world. By attaching virtual objects to anchors, they remain exactly where you left them, even after rebooting the headset.


Module 1: Creating Anchors

Anchors are created relative to a hit-test result or a specific pose.

anchors.jsjavascript
frame.createAnchor(pose, referenceSpace).then((anchor) => {
  // Store anchor.anchorSpace to render your object
  myAnchors.push({ anchor, object: threejsMesh });
});

Module 2: Cloud Anchors

Advanced APIs allow serializing anchors and sharing them via a backend, enabling multiple users to see the same virtual object on the same physical table.