3D & SpatialOpen source codemrdoob/three.js

three.js: Open Source AI Repository & Self-Hosting Guide

Leading open-source JavaScript 3D graphics library wrapping WebGL and WebGPU for interactive browser scenes, GLTF viewers, shaders, and spatial UI.

GitHub Stars
120,246 stars
Repository License
MIT
Last Push (UTC)
Dec 4, 2026
Check the repo's license. Model weights may have a different license.
git clone https://github.com/mrdoob/three.js.git
View on GitHubOfficial Website
Installnpm install three @types/three

three.js: Architecture & Practical Workflow

Three.js provides scene graphs, PBR materials, physically-based lighting, orbit/XR controls, and GLTF/GLB asset loaders directly in browser runtimes—powering everything from lightweight product configurators to WebGPU particle simulations.

Recommended End-to-End Pipeline

Generate a textured `.glb` model with Microsoft TRELLIS or Blender, compress geometry with gltfpack, and render an interactive 3D showcase inside React with Three.js.

Runtime Target
JavaScript library (GitHub)
Primary Users
Web developers, Interactive designers
Code License
MIT
Focus Topics
open-source, github, webgl, javascript, self-hosted

Quick Setup & Installation Steps

Platform target: JavaScript library (GitHub). Always verify environment variables and dependencies in the upstream repository README.

  1. 1Clone the repository from GitHub: `git clone https://github.com/mrdoob/three.js.git && cd three.js`.
  2. 2Review the MIT license (Check the repo's license. Model weights may have a different license.) and note any separate terms on external model weights.
  3. 3Install or launch the project directly: `npm install three @types/three` (use an isolated Python virtualenv, Node workspace, or Docker volume so dependencies remain clean).
  4. 4Validate end-to-end behavior with a small sample input (Generate a textured `.glb` model with Microsoft TRELLIS or Blender, compress geometry with gltfpack, and render an interactive 3D showcase inside React with Three.js.)

Hardware & VRAM Notes

Designed primarily for local or cloud GPU acceleration. Model weight size and batch resolution directly determine memory usage.

GPU & VRAM

NVIDIA CUDA GPU (typically 8 GB–24 GB+ VRAM depending on model checkpoint, quantization, and output resolution); check the README for FP8/GGUF offload options.

System RAM & Storage

16 GB–32 GB system RAM recommended plus 10 GB–40 GB free SSD space for container images, Python dependencies, and model weights.

Runtime Target

JavaScript library (GitHub)

Strengths & Best For

  • Browser 3D
  • Large example library
  • Active ecosystem
  • Best suited for: Web developers, Interactive designers

Limitations & Caveats

  • Requires coding
  • Performance depends on the scene and device
  • Check the repo's license. Model weights may have a different license.

3 Similar Tools on /tools (3D & Spatial)

Prefer a hosted web app instead of managing local weights or Docker containers? Explore these cloud alternatives.

Browse all tools
Self-Hosted three.js vs. Hosted Alternatives (Spline 3D Design & Hunyuan3D)
Factorthree.js (Self-Hosted)Spline 3D DesignHunyuan3D
Execution & PrivacyRuns locally via JavaScript library (GitHub); data stays on your disk or private server.Hosted cloud web interface; zero local dependency setup required.Hosted cloud web interface; zero local dependency setup required.
Cost & QuotaMIT code; bound only by local CPU/GPU hardware.Freemium; subject to vendor free-tier limits or paid plans.Open Source; subject to vendor free-tier limits or paid plans.
Primary FitBrowser 3D; Large example libraryWeb-based 3D design and motion graphics tool with real-time physics and interactivity.Tencent's high-resolution open-source 3D asset generator creating detailed geometry and PBR textures from single images or text.
Key Trade-offRequires codingRequires internet access and vendor account/quota limits.Requires internet access and vendor account/quota limits.

Matching Ready-Made Prompts

All Prompts →

Customize variables in Live Prompt Studio for three.js workflows.

Top-Down Flatlay of Accountant's Modern Oak DeskImage · Flatlay, Office, Desk, Photorealistic
Open in Studio
Golden Ratio Abstract Tech & Startup LogoImage · Branding, Vector, Minimalist, Logo
Open in Studio
Commercial Studio Travertine Product PhotographyImage · E-Commerce, Product, Commercial, Photorealistic
Open in Studio

Compare Alternatives

Compare Engine →

Compare three.js side-by-side on setup ease, privacy, and role scorecards.

More Open Source 3D & Spatial Repositories

Frequently Asked Questions

What does three.js do and how does it work?

three.js (mrdoob/three.js) is an open-source 3d & spatial project with 120,246 stars on GitHub. Leading open-source JavaScript 3D graphics library wrapping WebGL and WebGPU for interactive browser scenes, GLTF viewers, shaders, and spatial UI. Three.js provides scene graphs, PBR materials, physically-based lighting, orbit/XR controls, and GLTF/GLB asset loaders directly in browser runtimes—powering everything from lightweight product configurators to WebGPU particle simulations.

Is three.js free to self-host and use commercially?

three.js provides open source code licensed under MIT. Check the repo's license. Model weights may have a different license. Always verify both source code and model weight licenses in the GitHub repository before commercial deployment.

What hardware, runtime, or VRAM does three.js require?

three.js targets JavaScript library (GitHub). Typical installation runs via `npm install three @types/three`. Requires coding

How does self-hosting three.js compare to hosted tools like Spline 3D Design?

Self-hosting three.js gives you full local data control, zero per-usage vendor fees, and customizable JavaScript library (GitHub) pipelines—at the cost of managing your own setup and compute. By contrast, Spline 3D Design (Freemium) runs in the browser with no local installation, though usage quotas and cloud privacy policies apply.

Is three.js actively maintained and what workflow fits it best?

Repository metadata records 120,246 stars on GitHub with the latest recorded push on Dec 4, 2026. Generate a textured `.glb` model with Microsoft TRELLIS or Blender, compress geometry with gltfpack, and render an interactive 3D showcase inside React with Three.js.