Three.js is an MIT-licensed open-source 3D JavaScript and TypeScript rendering library for WebGL2 and WebGPU browsers. Free for commercial use with zero royalties, it handles glTF 2.0 PBR scenes, Draco/KTX2 compression, node shaders, and WebXR, serving as the core renderer behind React Three Fiber and browser 3D games.
Technical Overview
Architecture and Production Workflow
Three.js (r171+) provides a lean retained-mode 3D scene graph (Scene, PerspectiveCamera, Mesh, SkinnedMesh, InstancedMesh, BatchedMesh) over both WebGLRenderer and the modern WebGPURenderer. With Three.js Shading Language (TSL), graphics programmers author procedural materials and compute passes once in a composable JavaScript/TypeScript node graph that compiles automatically to WGSL on WebGPU browsers and GLSL 3.00 ES on WebGL2 fallback devices. InstancedMesh and BatchedMesh collapse thousands of distinct environment props into single GPU draw calls with frustum and per-instance visibility culling.
The asset pipeline standardizes around Khronos glTF 2.0 via GLTFLoader, supporting physically based metallic-roughness, clearcoat, transmission, anisotropy, skeletal skinning, and morph targets. Pairing GLTFLoader with DRACOLoader, MeshoptDecoder, and KTX2Loader shrinks 100 MB raw scenes down to sub-10 MB network transfers that transcode directly into BC7, ASTC, or ETC2 compressed GPU memory without spiking browser RAM. Because Three.js intentionally stays focused on rendering rather than imposing a monolithic engine architecture, game teams compose their own stack using @dimforge/rapier3d (WASM physics), three-mesh-bvh (raycasting), recast-navigation-js (navmeshes), and React Three Fiber or Miniplex ECS.
Pricing, Licensing, and Commercial Rights
Three.js is distributed under the permissive MIT license at $0 cost and 0% royalties for all commercial games, WebXR experiences, enterprise configurators, and Electron/Tauri Steam releases. All official addons in three/addons/ carry the same commercial-safe MIT terms.
Strengths and Tradeoffs in Studio Pipelines
| Pipeline Dimension | Production Strength | Practical Limitation |
|---|---|---|
| Bundle Weight & Control | Tree-shakeable ES modules (~150 KB gzipped core) with zero forced editor lock-in | Not a full game engine; teams must wire physics, audio, UI, and asset states themselves |
| Modern Web Graphics | Unified WebGPU + WebGL2 backend, TSL node shaders, and GPU compute buffers | Frequent monthly rXXX releases deprecate legacy APIs quickly if package.json is unpinned |
| Ecosystem Depth | Massive ecosystem including React Three Fiber, drei, pmndrs/postprocessing, and gltfjsx | Manual .dispose() calls on geometries, textures, and materials are required to prevent VRAM leaks |
Run every Blender .glb export through gltf-transform optimize --compress meshopt --texture-compress webp (or uastc KTX2) before loading into Three.js to cut mobile browser crashes and initial load latency.
AI Transparency & Steam Disclosure
Standard SoftwareProcedural math, physics, or manual authoring software.
Steamworks guidance: Standard software workflow; Steam AI disclosure does not apply.