Three-Live is Google's open-source AI-first native 3D, CAD, and spatial computing runtime and JIT compiler; the repository explicitly states that it is not an officially supported Google product. Its core idea: LLMs and developers are good at writing concise Three.js code and bad at writing hundreds of lines of platform-specific native 3D, shader, and AR boilerplate; Three-Live compiles standard Three.js (such as THREE.Mesh, THREE.CSG, userData.xr, KHR_interactivity) in an on-device sandboxed Rust VM, then renders natively on the target platform.
Main capabilities and platforms:
- Android: compiles standard Three.js code via zero-copy JNI, driving Google Filament native rendering, 60 Hz physics, and Jetpack XR SceneCore spatial entities.
- iOS, macOS, and visionOS: compiles the same Three.js code to Apple RealityKit (ARView / RealityView) or .usdz.
- Headless validation and compilation (three-live-cli and MCP server): can render a 4-panel orthographic/camera contact sheet (no GPU required), run a spatial linter that outputs JSON frustum/overlap telemetry, compile scene.js to .glb / .usdz, generate scenes from reference images (from-image), or connect as a zero-dependency MCP stdio server to MCP clients such as Gemini CLI, Google Antigravity, and Claude Code, providing tools such as three_live_validate, three_live_render, three_live_convert, three_live_from_image, three_live_bake_textures, three_live_sim, three_live_link, and three_live_gym_reset / step / close. The agent gym lets agents operate the scene step by step (act, observe, react) to inspect levWhether the card can be cleared; the name is borrowed from the reset/step environment terminology of reinforcement learning and does not involve machine learning.
- Web: <three-live> (a viewer under 35 KB gz, under 88 KB gz when including the real-time Three.js compiler) and <xr-live> (under 100 KB gz) render the same scene in WebGL2 and 6DoF WebXR, and support one-tap mobile AR handoff.
AI interaction capabilities: After adding three-live-ai.min.js, users can reshape the scene with any LLM; each edit is first compiled in a sandbox, automatically repaired once on failure, and only then hot-swapped, preventing erroneous generation from breaking the live scene. ai-endpoint uses the widely supported Chat Completions protocol and can connect to your own backend proxy, Ollama or LM Studio, vLLM, OpenRouter, or Gemini-compatible endpoints; API keys should be kept on the server side. It also supports Tap & Speak (tap a mesh and then describe modifications by voice), ai-select-on-tap, ai-voice-button (real-time voice conversation or browser speech recognition push-to-talk), and Talk-to-Select (select objects by voice, locally resolving references such as names, material colors, directions, ordinal numbers, and counts, and handing unresolvable ones to the code model).
Image-to-scene (compileFromImage): Photos, sketches, or blueprints can be converted into real-time procedural Three.js scenes, covering Web, Android, iOS, CLI, and MCP; images are automatically downsampled and JPEG-normalized, compiled in a sandbox, validated by a spatial quality gate (at least 2 meshes, finite bounds, non-empty frustum coverage, zero critical overlap errors) with a single round of automatic repair, optionally followed by closed-loop visual refinement (visualTurns 0..5), and then hot-swapped into the scene (el.undoEdit() can undo). Optional spatial priors (user height, ground normal, ARCore/ARKit detection boxes, RoomPlan scans, etc.) are used to anchor real-world scale and position.
AI textures: Add texture prompts next to material presets, with presets serving as offline fallback; the compiler itself does not call image models, and textures are provided by texture packs according to prompt, size (256/512/1024), and seed, with normal and roughness maps derived on-device. After configuring an OpenAI-compatible Images endpoint, missing textures are generated, cached in IndexedDB, and hot-swapped; exportTexturePack can be used to export them for consistency.
Installation: Android supports JitPack (maven("https://jitpack.io") followed by implementation("com.github.google.three-live:compiler:v1.5.0")), GitHub Packages Maven, prebuilt AAR, Maven Local, or building from source; iOS/macOS/visionOS uses Swift Package Manager (.package(url: "https://github.com/google/three-live.git", from: "1.0.0")); the Rust CLI and library are available via Crates.io (cargo add three-live-compiler or cargo install three-live-compiler --bin three-live-cli) or prebuilt binaries; Web is available via npm (npm install three-live xr-live), CDN, or building from source.
Use cases: Developers who need to let AI generate or modify 3D/AR scenes and present them natively across Android, Apple, and Web, as well as teams that want to provide headless 3D validation and conversion capabilities for AI coding agents. Limitations: Officially stated to be an unofficially supported product; some capabilities (such as AI texture generation and voice editing) depend on external model endpoint configuration; specific pricing, prices, and performance data are not yet provided.