specs-depth

Access real-time depth frames on Spectacles and back-project pixels to world-space 3D coordinates.

16|2|Updated Apr 13, 2026
One-click install
npx skills add https://github.com/lens-studio-devs/ls-extensions --skill specs-depth-lens-studio-devs
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: specs-depth
Source: https://github.com/lens-studio-devs/ls-extensions/tree/main/plugins/ls-clad/skills/specs-depth
Command: npx skills add https://github.com/lens-studio-devs/ls-extensions --skill specs-depth-lens-studio-devs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Building AR experiences on Spectacles that react to real-world geometry requires per-pixel depth data, but the DepthModule is an experimental API with non-obvious setup requirements, frame synchronization challenges, and no depth streaming in Lens Studio Preview, making integration error-prone. ## Core Features & Use Cases - Raw Depth Frame Access: Create a DepthFrameSession, receive per-pixel depth in centimeters, read camera intrinsics, and unproject pixels into world-space 3D points. - Depth Cache Pattern: Snapshot a synchronized depth+color frame pair, send the color image to an AI vision model, and convert returned pixel coordinates into world positions for placing AR labels on real objects. - Depth Texture Visualization: Render the live depth feed as a world-anchored point cloud using a custom instanced material for debugging and verification. - Use Case: A user pinches to capture a scene, the color frame goes to Gemini for object detection, and each returned pixel coordinate is converted via the cached depth frame into a 3D anchor for an AR label. ## Quick Start Ask the agent to set up a DepthModule session on Spectacles that reads depth frames and prints the world-space 3D position of the center pixel.

Frequently Asked Questions about specs-depth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I access depth frames on Spectacles in Lens Studio?▼

Require the DepthModule, create a DepthFrameSession inside OnStartEvent (not onAwake), subscribe to onNewFrame, and call session.start(). Each DepthFrameData provides a Float32Array of per-pixel depth in centimeters plus camera intrinsics.

How do I convert a depth pixel to a 3D world position?▼

Normalize the pixel to UV coordinates, call deviceCamera.unproject(uv, depthValue) to get a point in device reference space, then multiply by depthFrameData.toWorldTrackingOriginFromDeviceRef to obtain the world-space position.

Why is onNewFrame never firing for my depth session?▼

Depth only streams on-device, never in Lens Studio Preview. Also verify the Experimental API setting was saved so the .esproj lensDescriptors contains EXPERIMENTAL_API, and confirm the on-device camera permission prompt was accepted.

How do I combine Spectacles depth data with an AI vision model?▼

Use the DepthCache component to snapshot a synchronized depth+color pair, send the color texture to the vision model, then call getWorldPositionWithID with each returned pixel coordinate to get a world-space vec3 for AR placement.

Does the Spectacles depth camera work with internet access enabled?▼

No. Depth requires camera access, which disables open internet for the Lens. During development you can use Extended Permissions to allow both, but Lenses built that way cannot be released publicly.