Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

xrblocks

Hi there, we're XR Blocks 👋

Ballpit XR Emoji Gemini Icebreakers

NPM Package arXiv arXiv License

From idea to reality — a lightweight, open-source toolkit for rapidly prototyping AI + XR experiences on the open web.

✨ What is XR Blocks?

XR Blocks is a cross-platform JavaScript/TypeScript SDK built on three.js and WebXR that makes spatial computing approachable for both human creators and generative AI. It absorbs the incidental complexity of perception, rendering, and interaction behind high-level, human-centered primitives — user, world, ui, ai — so you can focus on the experience, not the plumbing.

Write once, run on an Android XR headset (e.g. Galaxy XR) or right in a desktop simulator in Chrome. Low floor, high ceiling. 🪜

Born at Google XR Labs and built together with the community. 🌈

🧩 The blocks

Capability
🖐️ Hands & gestures — joint tracking, pinch/fist/point/spread, custom on-device models
🌍 World understanding — depth sensing, real-world occlusion, plane / object / scene-mesh detection
🤖 AI integration — Gemini & OpenAI multimodal queries, Gemini Live, image generation, agents
🪟 Spatial UI — declarative panels, flexbox cards, gradients & shadows (uiblocks)
🧱 Physics — depth-aware Rapier rigid bodies that bounce off the real room
🔊 Spatial audio & speech — positional sound, recording, speech recognition/synthesis
👥 Multiplayer — presence, shared objects, and spatial voice (netblocks)
🖥️ Desktop simulator — develop and test without a headset

⚡ Hello, XR — in a few lines

import * as THREE from 'three';
import * as xb from 'xrblocks';
class MainScript extends xb.Script {
 init() {
 this.add(new THREE.HemisphereLight(0xffffff, 0x666666, 3));
 this.cube = new THREE.Mesh(
 new THREE.BoxGeometry(0.3, 0.3, 0.3),
 new THREE.MeshStandardMaterial({color: 0x4285f4})
 );
 this.cube.position.set(0, xb.user.height - 0.3, -xb.user.objectDistance);
 this.add(this.cube);
 }
 onSelectEnd() {
 // Pinch in XR, or click in the simulator.
 this.cube.material.color.set(Math.random() * 0xffffff);
 }
}
xb.add(new MainScript());
xb.init(new xb.Options());

🚀 Start here

📦 SDK & source google/xrblocks · npm i xrblocks
📖 Manual & docs https://xrblocks.github.io/docs/
🧪 Templates https://xrblocks.github.io/docs/templates/Basic/
🎮 Live samples https://xrblocks.github.io/docs/samples/
💎 XR Blocks Gem (vibe-code XR with Gemini) https://xrblocks.github.io/gem

📚 Resources

🤝 Get involved

We'd love to grow an AI + XR community! 💙

  • Star google/xrblocks to follow along
  • 🐛 File issues for bugs and feature ideas
  • 🔧 Open a PR — see CONTRIBUTING.md and AGENTS.md in the main repo (run npm run lint, npm run format, and npm test first)
  • 🎨 Build & share a demo — every XR Blocks app is web-standard and instantly shareable via a URL
  • 💬 Read the white paper for the roadmap and where we're headed

📝 Cite us

BibTeX
@misc{Li2025XR,
 title={{XR Blocks: Accelerating Human-centered AI + XR Innovation}},
 author={Li, David and Numan, Nels and Qian, Xun and Chen, Yanhe and Zhou, Zhongyi and others},
 year={2025},
 eprint={2509.25504},
 archivePrefix={arXiv},
 primaryClass={cs.HC},
 url={https://arxiv.org/abs/2509.25504},
}
@misc{Du2026Vibe,
 title={Vibe Coding XR: Accelerating AI + XR Prototyping with XR Blocks and Gemini},
 author={Du, Ruofei and Hersh, Benjamin and Li, David and Numan, Nels and Qian, Xun and others},
 year={2026},
 eprint={2603.24591},
 archivePrefix={arXiv},
 primaryClass={cs.HC},
 url={https://arxiv.org/abs/2603.24591},
}

🪪 License & notice

Apache-2.0. Powered by WebXR, three.js, Gemini, and LiteRT. ⚡

This is not an officially supported Google product, but is actively maintained by the XR Labs team and external collaborators.

Popular repositories Loading

  1. evals evals Public

    Evaluation assets of XR Blocks

    2 1

  2. xrblocks.github.io xrblocks.github.io Public

    XR Blocks: Accelerating AI + XR Innovation

    HTML 1 1

  3. assets-genai assets-genai Public

    1 1

  4. proprietary-assets proprietary-assets Public

    Propriety assets used in XR Blocks samples. Do not reuse these without acquiring a license.

    2

  5. assets assets Public

    XR Blocks sample assets

    3

  6. panos panos Public

    open source panoramas

Repositories

Loading
Type
Select type
Language
Select language
Sort
Select order
Showing 7 of 7 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading...

Most used topics

Loading...

AltStyle によって変換されたページ (->オリジナル) /