spectacles-spatial-persistence

Installation
SKILL.md

Spatial Persistence

Spectacles support persisting digital content (anchors) across sessions using the Spatial Anchors API. This enables users to place an object in their physical room, close the lens or reboot the device, and have the object reappear in the exact same physical location when they return.

Official docs: Spectacles Home · Spatial Anchors

[!WARNING] The DeviceTracking component's mode MUST be set to World for Spatial Anchors to function.

Creating and Persisting a World Anchor

Persisting content is a two-step process: first you create a local World Anchor using AnchorSession, then you explicitly save it to the device using AnchorSession.saveAnchor().

import { AnchorSession, AnchorSessionOptions } from "Spatial Anchors.lspkg/AnchorSession";
import { AnchorModule } from "Spatial Anchors.lspkg/AnchorModule";
import { State } from "Spatial Anchors.lspkg/Anchor";

// 1. Get the AnchorModule
const anchorModule = global.scene.getRootObject(0).getComponent(AnchorModule.getTypeName());

// 2. Configure Options
Related skills

More from rolandsmeenk/lensstudioagents

Installs
2
GitHub Stars
5
First Seen
Apr 24, 2026