본문으로 건너뛰기

google/xrblocks

XR Blocks is a lightweight WebXR + AI library for rapidly prototyping advanced AI + XR experiences.

https://skillcdn.ai/gh/google/xrblocks

내 AI에 이 주소를 연결하면 이 스킬을 쓸 수 있어요. 연결 방법 보기

  • 미확인
  • 기본 브랜치main
  • 커밋f2d2cc8
  • 라이선스Apache-2.0
  • 검색단어
GitHub에서 보기

xb-add-world-sensing

Connect physical-world sensing to XR Blocks application state. Use when adding planes, scene meshes, depth, occlusion, world collision evidence, object or human recognition, face tracking, segmentation, or agent-facing scene context.

경로
skills/xb-add-world-sensing/SKILL.md
라이선스
Apache-2.0

Add world sensing

Build a complete sensing behavior: evidence enters the app, becomes current state, and produces an observable reaction.

1. Write the sensor contract

Name the physical or scene signal, cadence, observable reaction, data freshness, permissions, target runtime, and behavior for unsupported, denied, warming-up, empty, stale, and failed states.

Read references/branches.md, select the narrowest branch that supplies the signal, and read only that branch's manual and example.

Complete this step when one named signal maps to one reaction and every absence state maps to an explicit application state.

2. Prove the selected branch

Verify each planned symbol in ../../src/xrblocks.ts and its implementation. Inspect the linked current manual, template, or sample. Record the exact option, permission, WebXR session feature, optional dependency, simulator fidelity, and real-device check before editing application code.

Complete this step when every input has current source or executable evidence and the target runtime is explicit.

3. Connect evidence to app state

Configure the branch before xb.init(options) and keep application behavior in an xb.Script. Let XR Blocks own sensor and render update loops. For explicit detection, prevent uncontrolled concurrent requests and display pending state. For continuous detectors, use start(client) and stop(client) with the same client object.

Convert success into the requested reaction. Convert empty arrays, null, missing sensor data, denied permission, rejected session startup, and stale observations into the contract's absence state. Clear previous output when it is no longer current.

Complete this step when fresh evidence changes observable state and missing or stale evidence clears or replaces it deterministically.

4. Preserve targeting and placement ownership

Use the interaction pipeline's resolved hit for ray-based placement. A reticle displays that hit; it does not own target data. Use xb.world.placeOnHorizontalSurface() for one-time surface placement. Use the Placement manual for continuous follow/face/orbit behavior and its manipulation rebasing.

Complete this step when the sensor, interaction resolver, reticle, and placed object each have one clear responsibility.

5. Prove and hand off sensing

Build or type-check the app and start the exact simulator route when available. Confirm options, imports, permissions, detector ownership, freshness, result mapping, absence states, and cleanup. Add deterministic simulator ground truth only when the branch supports it.

Give separate simulator and device instructions when their evidence differs. Name the signal to present, expected reaction, empty result, stale clearing, permissions, and synthetic versus native evidence.

Finish when successful, empty, denied, unsupported, failed, and stale states have reproducible checks for the selected branch.

이 스킬의 파일

지원 파일 전체 둘러보기