
Three-Live 3D, CAD & Spatial XR Compiler
io.github.google由 GitHub 帳號 google 發布v1.3.1更新於 Nov 7, 2026
Compile, lint, simulate (60 Hz), and render 3D scenes from Three.js to GLB, USDZ, Android & iOS.
概覽
讓助理編譯、檢查、模擬並算繪 Three.js 三維場景,輸出 GLB、USDZ 以及 Android、iOS 與 XR 原生目標。
- 可以做什麼
- 把 Three.js 場景程式碼編譯為 GLB、USDZ 資產,以及 Android(Filament、Jetpack XR)或 iOS/visionOS(RealityKit)原生輸出
- 在建置或發佈前對場景腳本做檢查與驗證
- 以 60 Hz 決定性物理和 KHR_interactivity 對場景進行模擬
- 算繪無介面的四宮格 PNG 拼圖,方便審閱場景
- 除原生行動裝置與頭戴裝置執行環境外,還可輸出 WebGL2 與 WebXR 目標
- 適用情境
- 適合助理撰寫 Three.js 場景程式碼、並希望對其檢查、模擬並轉為可攜式三維資產或原生 AR/XR 建置,而不必手寫各平台樣板程式碼的情境。最適用於已以 Three.js 為基礎的三維、CAD 與空間運算專案。
- 執行需求
- 以本機 stdio 程序執行,透過 npm 套件 three-live 安裝。未宣告驗證、環境變數或請求標頭。README 指出原生 Android 與 iOS 建置需要各自的工具鏈(Android NDK、Xcode),另提供 Rust CLI。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Three-Live 3D, CAD & Spatial XR Compiler,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Disclaimer: This is not an officially supported Google product.
Three-Live
AI-First Native 3D, CAD & Spatial Computing: On-device JIT compiler turning live, AI-generated Three.js into native Android (Google Filament & Jetpack XR), iOS & visionOS (Apple RealityKit), and WebXR.
⚡ Quickstarts (Android • iOS • CLI • Web) • 📦 Install (JitPack • SwiftPM • Cargo • npm) • ▶ Live 3D Studio • 🥽 Live Spatial XR Studio • 📚 Docs
LLMs and developers excel at writing concise Three.js code—not hundreds of
lines of platform-specific native 3D, shader, and AR boilerplate. Three-Live
compiles standard Three.js (THREE.Mesh, THREE.CSG, userData.xr,
KHR_interactivity) on-device in a sandboxed Rust VM and renders natively in
Google Filament and Jetpack XR SceneCore on Android, Apple RealityKit and
Quick Look on iOS and visionOS, headless 4-up PNG contact sheets
(three-live-cli) for AI coding agents, and WebGL2 / WebXR on the Web.
Quickstarts
1. Run Three.js natively on Android (Google Filament & Jetpack XR SceneCore)
Compile standard Three.js code over zero-copy JNI and drive native Google Filament rendering, 60 Hz physics, and Jetpack XR SceneCore spatial entities:
2. Run Three.js natively on iOS, macOS, and visionOS (Apple RealityKit)
Compile the exact same Three.js code into Apple RealityKit (ARView /
RealityView) or .usdz:
3. Verify & compile Three.js headlessly for AI agents (three-live-cli & MCP server)
Render a 4-up orthographic/camera contact sheet (zero GPU required), run the
spatial linter for JSON frustum/overlap telemetry, compile scene.js to .glb
/ .usdz, or attach three-live-cli mcp as a zero-dependency Model Context
Protocol (MCP) stdio server (three_live_validate, three_live_render,
three_live_convert, three_live_sim) in Claude Code, Cursor, Gemini CLI, or
Windsurf:
4. Run on the Web (<three-live> and <xr-live>)
On the web, <three-live> (< 30 KB gz viewer, < 72 KB gz with the live
Three.js compiler) and <xr-live> (< 84 KB gz) render the same Three.js
scenes in WebGL2 and 6DoF WebXR with 1-tap mobile AR handoff:
Install packages and bundles
Package installation
-
1. Android (JitPack, GitHub Packages Maven, prebuilt release AAR, or source):
-
JitPack (
https://jitpack.io, no authentication required): Addmaven("https://jitpack.io")tosettings.gradle.kts, then add: -
GitHub Packages Maven (
https://maven.pkg.github.com/google/three-live): Configure the repository insettings.gradle.ktsand addimplementation("com.google.threelive:compiler:1.3.1")(plus optional:filament,:firebase-ai,:detect-mlkit,:hands-androidxr,:hands-mediapipe). -
Prebuilt AAR: Download
three-live-compiler-release.aar(includesarm64-v8a,armeabi-v7a, andx86_64JNI.solibraries) and optional adapter AARs (three-live-filament-release.aar, etc.) from GitHub Releases intoapp/libs/and addimplementation(files("libs/three-live-compiler-release.aar")). -
Maven Local (
com.google.threelive:compiler:1.3.1): Run./gradlew :mobile:android:publishReleasePublicationToMavenLocaland addimplementation("com.google.threelive:compiler:1.3.1"). -
From source: Run
make android(orbash scripts/build_android_aar.sh).
-
-
2. iOS, macOS, and visionOS (Swift Package Manager):
Swift Package Manager automatically resolves the prebuilt, checksum-pinned
ThreeLiveCompiler.xcframework.ziparchive from GitHub Releases—no local Rust or Node.js toolchain is required. -
3. Rust CLI (
three-live-cli) and library crate (Crates.io, prebuilt binaries, or source):-
Crates.io (library & CLI):
-
Prebuilt binaries: Download standalone binaries for macOS (
arm64andx86_64), Linux (x86_64andaarch64), and Windows (x86_64.exe) from GitHub Releases. -
From source: Run
make rust(npm run build && cargo build --manifest-path compiler/Cargo.toml --release --bin three-live-cli).
-
-
4. Web (npm, CDN, prebuilt release, or source):
-
npm:
-
Hosted ES module (
jsDelivror GitHub Pages CDN): Loadhttps://cdn.jsdelivr.net/npm/three-live/dist/three-live.min.jsorhttps://google.github.io/three-live/dist/three-live.min.js. -
Prebuilt bundle archive: Download
three-live-web-dist.zipfrom GitHub Releases. -
From source: Run
git clone https://github.com/google/three-live.git && cd three-live && npm install && npm run build.
-
Why Three-Live and XR-Live
Native mobile and headset AR/XR from Three.js
In practice, browser WebXR (navigator.xr) only covers part of the device
landscape:
- Android System
WebView, iOS Safari, and iOSWKWebViewdon't support WebXR. A WebXR-only app can't run inside an embeddedWebVieworWKWebViewin a native Android or iOS app, and can't enter AR in Safari on iPhone or iPad. - Static OS handoffs (
Scene ViewerandAR Quick Look) strip interactivity. Exporting a static.glbor.usdzfile to the OS previewer works for viewing a model, but drops Three.jsanimate()loops, 60 Hz physics, custom state, and interactive plugins. - Browser WebXR doesn't use native spatial compositors. On Android,
browser WebXR renders WebGL2 in the browser process rather than using Google
Filament or Jetpack XR SceneCore's
HomeSpaceshared space. On visionOS, browser WebXR runs in an isolated fullscreen VR session without camera passthrough or SwiftUI Shared Space integration.
Three-Live solves this by compiling the same Three.js code on-device and running it natively on each platform's own engine:
Compare <three-live> and <xr-live>
The following table compares the two runtime tiers across Android, iOS, and Web:
HTML attribute compatibility with <model-viewer>
On the web, <three-live> supports the core HTML attributes used by
<model-viewer> (src, poster,
camera-controls, camera-orbit, camera-target, min-camera-orbit,
max-camera-orbit, field-of-view, auto-rotate, auto-rotate-delay,
rotation-per-second, ar, ar-modes, ar-scale, ar-placement, exposure,
shadow-intensity, shadow-softness, tone-mapping, environment-image,
skybox-image, autoplay, animation-name, variant-name, and
slot="hotspot-*").
If you have existing <model-viewer> HTML markup and want to add procedural
Three.js scripts, native Android/iOS runtime targets, or CLI/MCP scene
validation without renaming tags, call ThreeLiveElement.defineModelViewer()
(or defineModelViewer()) to register <three-live> under the <model-viewer>
custom element name when @google/model-viewer is not loaded.
Modular plugins across Android, iOS, and Web
Every capability works on both prebuilt .glb, .usdz, and .spz assets and
live Three.js scenes:
- Compact core (
< 30 KBto< 84 KB gzon Web): The 3D viewer (three-live-viewer.min.js) is< 30 KB gz(< 72 KB gzwith the live Three.js compiler inthree-live.min.js), and the WebXR viewer (xr-live-viewer.min.js) is< 54 KB gz(< 84 KB gzwith the live Three.js compiler inxr-live.min.js). - Core 3D, CAD, and animation plugins (
three-live, 15 plugins): Optional domain bundles (three-live-studio.min.jsat< 29 KB gz,three-live-cad.min.jsat< 10 KB gz, andthree-live-animation.min.jsat< 11 KB gz, or< 113 KB gzcombined inthree-live-full.min.js) addKHR_interactivitybehavior graphs, PBR Next materials,KHR_materials_variants,EXT_meshopt_compression, HDRI and spherical-harmonics lighting, contact shadows, 3D hotspots, post-processing (bloomandoutline), automatic multi-tier Level-of-Detail (lod/THREE.LOD/MSFT_lod), 2DShape/ExtrudeGeometry, 3DCSGBooleans, 3D vectorTextGeometry, 64-joint GPU skeletal skinning, morph targets, keyframe cross-fading, and two-bone / FABRIK inverse kinematics (ik). - Hardware XR sensors (
xr-live-sensors.min.js,< 10 KB gz): Adds hardware XR depth occlusion (XRDepthManager), analytical heightfield physics (XRHeightfieldPhysics), 25-joint hand gesture classification (XRHandGestureClassifier), the desktop 6DoF keyboard/mouse simulator (XRDesktopSimulator), HRTF spatial audio earcons, and WebMCP agent tools. - Spatial computing plugins (
xr-live-spatial.min.js, 15 plugins,< 63 KB gz): Each advanced spatial capability inxr-live-spatial.min.jsis a standalone, zero-dependency plugin (~2 to 5 KB gzeach) with a matching native implementation in the Android and iOS SDKs. - Simulation and scenario plugins (
xr-live-sim.min.js, 6 plugins,< 26 KB gz): Six plugins for games, training drills, and safety walkthroughs add a controllable character, autonomous steering agents, deterministic 60 Hz rigid-body physics (rigid-body), integrity and trigger zones, checklist objectives with scoring and timers, and procedural audio cues across Android, iOS, and Web.
Core 3D, CAD, and animation plugins (three-live)
The following table lists the fifteen modular 3D, CAD, and animation plugins:
Spatial perception, splat, audio, and multimodal AI plugins (xr-live)
The following table lists the eight perception, rendering, audio, and AI plugins across Android Filament, iOS RealityKit, and WebXR:
CAD review, spatial layout, locomotion, and co-presence plugins (xr-live)
The following table lists the seven CAD, layout, locomotion, and multi-user plugins across Android Filament, iOS RealityKit, and WebXR:
Interactive simulation, agent, and scenario plugins (xr-live-sim)
The following table lists the six simulation plugins across Android Filament, iOS RealityKit, and Web:
JavaScript bundles and enforced size budgets (Web)
Every web bundle targets es2020, strips full license blocks
(--legal-comments=none), and emits a single four-line SPDX header:
Safe execution for live, AI-generated Three.js
Because LLMs already know Three.js, an agent or backend can generate a complete
interactive 3D or XR scene in 15 to 30 lines of JavaScript without external
binary assets. Three-Live executes Three.js scripts inside a sandboxed Rust
Boa/QuickJS VM on Android and iOS, and inside a dedicated Web Worker or
opaque-origin <iframe sandbox="allow-scripts"> (connect-src 'none') on the
web—with network and storage globals removed, Object.prototype frozen, CPU
instruction fuel limits, and scene geometry memory quotas.
Project status
Three-Live is in Beta. Its core 3D, mobile AR/XR, and spatial computing
runtime, versioned userData.xr trait schema (schemaVersion: 1), sandboxed
JIT compiler, and three-target parity across Android XR, Apple RealityKit, and
Web are feature-complete and ready for integration and evaluation.
- Prebuilt distributions: The Android release AAR
(
three-live-compiler-release.aar), the Apple XCFramework (ThreeLiveCompiler.xcframework.zip), nativethree-live-clibinaries for macOS, Linux, and Windows, and standalone web JavaScript bundles (three-live-web-dist.zip) are published on GitHub Releases. - Package registries: Published on JitPack / GitHub Packages Maven,
Swift Package Manager,
Crates.io (
three-live-compiler), npm (three-live), npm (xr-live), GitHub Releases, and the jsDelivr / GitHub Pages CDNs (see Install packages and bundles). - Release notes: See
CHANGELOG.mdfor release history and architectural notes.
Documentation guide
The following guides cover the native mobile SDKs, spatial plugins, web components, and LLM authoring workflows:
Build and run demos
Run make (or make help) from the repository root to build packages, run tests, or open the interactive studio demos:
Security
Untrusted client Three.js script execution is disabled by default on the web
(allow-client-scripts required) and always runs inside an isolated QuickJS/Boa
VM on Android and iOS or a sandboxed Worker / opaque-origin <iframe>
(connect-src 'none') on Web—with network and storage globals stripped,
Object.prototype frozen, CPU instruction fuel limits, and geometry memory
quotas.
To report a vulnerability, please follow the instructions in
SECURITY.md.
Contributing
Contributions are welcome! Please read CONTRIBUTING.md and
CODE_OF_CONDUCT.md before submitting a pull request.
License
Licensed under the Apache License, Version 2.0.
來源:README.md,提交 0ac208f
工具
0版本歷史
1- v1.3.1最新Nov 7, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分