
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 分