xrSession.requestReferenceSpace("local").then((refSpace) => {
xrReferenceSpace = refSpace;
// …
});XRReferenceSpace / notebook
XRReferenceSpace
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
let offsetTransform = new XRRigidTransform(
{ x: 2, y: 0, z: 1 },
{ x: 0, y: 0, z: 0, w: 1 },
);
xrReferenceSpace = xrReferenceSpace.getOffsetReferenceSpace(offsetTransform);