google/three-live

AI-first Native 3D, CAD & spatial computing. Runtime and JIT compiler for Android (Filament & Jetpack XR), iOS/visionOS (RealityKit), and WebGL2/WebXR.

What it solves

Building interactive 3D, AR, and XR experiences typically forces developers to choose between writing lots of platform-specific native code (shaders, scene graphs, AR plumbing) or using WebXR, which doesn't work in many embedded browsers and loses interactivity when handing off to static viewers. Three-Live fixes this by letting you write standard Three.js scenes once and run them natively on each platform's own rendering engine — Google Filament and Jetpack XR on Android, Apple RealityKit on iOS/visionOS, and WebGL2/WebXR on the web — with animations, physics, and interactivity preserved.

How it works

Three-Live compiles standard Three.js code on-device inside a sandboxed Rust VM. Instead of running a JavaScript render loop in a browser, it converts the scene description to a zero-copy GLB binary and hands it to the native engine of the host platform. The compiler handles common Three.js constructs like THREE.Mesh, geometry, materials, and CSG, plus special userData.xr properties for spatial traits (grabbing, billboarding, anchoring). It also steps physics at 60 Hz and manages interactive graph updates per frame. Alongside the native runtimes, a command-line tool (three-live-cli) and a Model Context Protocol (MCP) server let AI agents render contact sheets headlessly, validate scenes, convert to .glb/.usdz, and even play through a scene step-by-step to check it's winnable.

The web components (<three-live> and <xr-live>) embed the same compiler and add AI features: users can edit scenes by typing or speaking, select objects by voice, generate scenes from images or sketches, and attach AI-generated textures — all verified in the sandbox before being applied, so a bad generation never breaks the live scene.

Who it’s for

  • Mobile and headset developers who want to ship cross-platform AR/XR apps without writing native scene graphs for each platform.
  • AI engineers and tool builders who need agents to generate, validate, and iterate on 3D scenes programmatically.
  • Web developers embedding 3D or AR features who want the same codebase to work in browsers, on iOS, and on Android.

Highlights

  • Write once in Three.js, run natively on Android, iOS, visionOS, and the web with real interactivity (physics, animations, spatial traits).
  • On-device JIT compiler with a sandboxed Rust VM — no network needed for compilation.
  • Zero-copy GLB output loads directly into Filament, RealityKit, or WebGL2/WebXR.
  • CLI and MCP server for headless rendering, validation, conversion, and an “agent gym” for testing scenes step-by-step.
  • AI-driven scene editing with optional voice control, image-to-scene generation, and AI texture baking — all falling back to offline presets.
  • Lightweight web components (<three-live> < 31 KB gz viewer) with AI and XR features built in.

Related

  • Project
  • Project
  • Project
  • Project