frame.createAnchor(anchorPose, referenceSpace).then(
(anchor) => {
// Do stuff with the anchor (assign objects that will be relative to this anchor)
},
(error) => {
console.error(`Could not create anchor: ${error}`);
},
);XRFrame: createAnchor() method / notebook
XRFrame: createAnchor() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.