xb-depth

Add depth sensing and occlusion to XR Blocks applications.

455|91|Updated Sep 25, 2025
One-click install
npx skills add https://github.com/google/xrblocks --skill xb-depth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xb-depth
Source: https://github.com/google/xrblocks/tree/main/skills/xb-depth
Command: npx skills add https://github.com/google/xrblocks --skill xb-depth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill adds depth sensing capabilities to XR Blocks apps, enabling realistic occlusion and depth-aware interactions.

Core Features & Use Cases

  • Depth Sensing: Incorporates depth map and depth mesh for real-world geometry awareness.
  • Occlusion: Ensures virtual content is occluded by real-world objects.
  • Physics Collider: Generates physics colliders that match the environment for interactive experiences.
  • Use Case: Use it to create immersive AR experiences where real-world objects interact with virtual content.

Quick Start

Initialize the skill with depth sensing enabled and start your XR Blocks app.

const options = new xb.Options();
options.enableDepth(); // depth sensing + depth mesh
xb.init(options);

Frequently Asked Questions about xb-depth

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

FAQPage Schema
How do I add depth sensing and occlusion to my XR Blocks app?

To add depth sensing and occlusion to your XR Blocks app, initialize the xb.Options object, call options.enableDepth() to incorporate the depth map and depth mesh, and pass the options to xb.init(). This enables real-world geometry awareness for realistic interactions.

What does depth sensing do for immersive AR experiences?

Depth sensing provides real-world geometry awareness by incorporating a depth map and depth mesh into immersive AR experiences. This ensures virtual content is properly occluded by real-world objects, creating realistic and interactive depth-aware environments.

Does WebXR depth sensing support physics colliders for AR object interactions?

Yes, WebXR depth sensing supports physics colliders by generating a depth mesh that matches the physical environment. This allows virtual content in AR applications to interact realistically with real-world geometry through accurate physical collisions.

Do I need specific hardware for depth occlusion in XR Blocks?

Yes, depth occlusion in XR Blocks targets devices that support the WebXR Depth Sensing API. You must use compatible hardware to generate the depth map and depth mesh required for virtual content occlusion.

Can I use depth mesh to generate physics colliders for virtual objects?

Yes, you can use the generated depth mesh to create physics colliders that match your environment. This functionality is built into the depth sensing feature, enabling interactive AR experiences where virtual objects collide with real-world surfaces.