three.js

The cross-browser JavaScript 3D library that renders scenes through WebGL and WebGPU behind one unified, node-based shading API.

Library
npm
v0.186.1
115,997 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
98 /100 Excellent
Development Activity 100
Maintenance 96
Community 96
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
86 /100 Excellent
Architecture 90
Code Quality 88
Innovation 85
Learning Curve 80

three.js is the library most JavaScript developers reach for when they need real-time 3D (or 2D) graphics in a browser tab, no plugins required. It wraps the low-level WebGL and WebGPU APIs in a coherent scene graph — cameras, lights, geometries, materials, and meshes composed as objects rather than raw draw calls — so building a working scene takes a dozen lines instead of hundreds of lines of shader boilerplate.

Started by Ricardo Cabello (mrdoob) in 2010, the project has grown into the de facto standard for web-based 3D: it powers everything from product configurators and data visualizations to WebXR experiences and generative art, and ships monthly releases (r-numbered) with a large addon ecosystem (loaders, controls, post-processing, physics bridges) distributed alongside the core.

The modern core is built around TSL (Three.js Shading Language), a JavaScript-authored node system that compiles down to either GLSL (WebGL) or WGSL (WebGPU) from the same material graph — letting projects target both renderers, and eventually compute shaders, without hand-writing two shader languages.

What You Get

  • A full scene graph (Object3D/Scene/Group hierarchy) with transforms, raycasting, and frustum culling handled for you
  • Dual-backend rendering — WebGLRenderer and WebGPURenderer share the same TSL-authored materials so a project can target either backend
  • TSL (Three.js Shading Language), a JS node-graph API for authoring shaders that compiles to GLSL or WGSL without hand-writing either
  • A large catalog of geometries, standard/physical materials (PBR), lights, and loaders (glTF, Draco, KTX2, OBJ, and more) shipped as addons in examples/jsm
  • Built-in animation system (AnimationMixer, keyframe tracks, skeletal/morph-target animation) and a WebXR integration for VR/AR
  • 600+ runnable examples and an extensive manual/docs site (threejs.org) covering every module in the public API

Common Use Cases

  • Interactive product configurators and 3D e-commerce viewers rendered directly in the browser
  • Data and scientific visualization that needs true 3D perspective, point clouds, or volumetric rendering
  • WebXR (VR/AR) experiences that need a scene graph rather than raw WebXR device API calls
  • Generative art, creative-coding, and shader-driven visual experiments authored through TSL
  • Game-like interactive experiences and 3D UI elements embedded in otherwise conventional web apps

Under The Hood

Architecture At the center of three.js is a classic scene-graph: Object3D (src/core/Object3D.js, ~1700 lines) provides the transform hierarchy, matrix updates, and traversal that every Scene, Mesh, Camera, and Light inherits from, while Three.Core.js re-exports the renderer-agnostic pieces (math, core, geometries, materials, loaders) separately from Three.js, which layers the concrete WebGLRenderer on top — a separation that lets Three.WebGPU.js swap in the WebGPU backend against the same core object model. Rendering itself is split into a large src/renderers/ tree with parallel webgl/ and webgpu/ subfolders sharing a common/ layer, and a src/nodes/ tree (accessors, core, display, lighting, math, procedural, tsl) that implements the node-graph compiler feeding both backends — the architecture’s central bet is that authoring shaders as composable node graphs, not backend-specific shader strings, is what lets one material definition target two entirely different graphics APIs. What would break if that abstraction changed: virtually every downstream addon in examples/jsm, since materials, post-processing passes, and loaders all consume the node system’s public surface.

Tech Stack Pure JavaScript (ES modules, no required TypeScript, though .d.ts-adjacent type packages exist separately) with zero runtime dependencies — the entire 3D math (src/math/), scene graph, and renderers are hand-rolled rather than delegated to third-party libraries. The build pipeline uses Rollup (utils/build/rollup.config.js) to produce ESM and CJS bundles (build/three.module.js, build/three.cjs, plus a dedicated build/three.webgpu.js and build/three.tsl.js), and ESLint (flat config, eslint.config.js) enforces style across src, examples, editor, manual, test, and utils as separate lint targets. Distribution is npm-native (package name three) with addons (loaders, controls, postprocessing) shipped as ES modules under examples/jsm/ rather than bundled into the core, keeping the core package lean while still being installable from the same package.

Code Quality Testing uses QUnit across 264 unit test files under test/unit/src/ (mirroring the src/ module layout one-for-one, e.g. test/unit/src/core/BufferAttribute.tests.js) plus addon tests under test/unit/addons/, run headlessly through Puppeteer (test/unit/puppeteer.unit.js); there’s a separate end-to-end visual-regression suite (test/e2e/) that renders the example gallery and diffs screenshots, plus a tree-shaking test (test/rollup.treeshake.config.js) that verifies unused modules are actually eliminated from bundles. Error handling favors explicit throw/console.error at API boundaries (e.g. BufferAttribute rejecting non-typed-array input) over silent failure, naming is consistent and PascalCase-for-classes throughout, and CI (.github/workflows/ci.yml, plus dedicated CodeQL, bundle-size-report, and protected-folders workflows) runs lint, unit, and e2e suites on every change — a maturity level consistent with a 15-year-old project maintained by a large, active contributor base (2,554 contributors).

API Design The public API optimizes for the “twelve lines to a rendered cube” experience shown in its own README: new THREE.Scene(), new THREE.PerspectiveCamera(), new THREE.Mesh(geometry, material), renderer.render(scene, camera) — a handful of composable primitives rather than a large configuration object. TSL extends that ergonomics story into shader authoring: instead of writing GLSL/WGSL strings, developers compose small JS functions (vec3(), mul(), texture(), etc.) that read like normal JavaScript and get compiled per-backend, which meaningfully lowers the barrier to custom materials compared to hand-written shader code. The tradeoff is API surface size — the full module catalog (geometries, materials, loaders, nodes, controls) is large, and the migration guide wiki exists specifically because the r-numbered release cadence (roughly monthly) does introduce breaking changes across the 100+ documented releases in the project’s history.

Used by 29 apps in this directory

Go
59%
Apache 2.0

agent-orchestrator

AI Agents · AI Code Assistants · Developer Tools

12,440

A local desktop workspace that gives every coding task its own agent, Git branch, and worktree, then tracks tasks, pull requests, CI, and reviews for 27 coding agents on one live Kanban board.

View details
86
Repo Health
83
Technical
68
Dependency
Built with
Go 59%
TypeScript 38%
Updated 4 days ago
TypeScript
92%
GPL 3.0

Blinko

Knowledge Management · Note Taking

11,049

A self-hosted, AI-powered card note-taking tool that lets you capture fleeting thoughts instantly and retrieve them with natural language search.

View details
75
Repo Health
69
Technical
63
Dependency
Built with
TypeScript 92%
Updated 1 months ago
Rust
67%
MIT

Bun

Developer Tools

96,068

An all-in-one JavaScript and TypeScript toolkit — one Rust-and-JavaScriptCore binary that replaces Node.js, npm, a bundler, and a test runner with faster equivalents.

View details
92
Repo Health
91
Technical
64
Dependency
Built with
Rust 67%
C++ 19%
TypeScript 10%
Updated 5 days ago
TypeScript
79%
Other

Directus

CMS · Low Code Platforms

37,987

Connect any SQL database and get instant REST and GraphQL APIs, a visual management Studio, and a native MCP server for AI agents — free for most organizations.

View details
92
Repo Health
82
Technical
76
Dependency
Built with
TypeScript 79%
Vue 19%
Updated 1 weeks ago
TypeScript
54%
MIT

FormBee

Forms Surveys

770

A self-hostable form backend that accepts HTML form submissions and routes them to email, Telegram, Discord, webhooks, and automation platforms — without writing any server-side code.

View details
43
Repo Health
48
Technical
70
Dependency
Built with
TypeScript 54%
SCSS 25%
HTML 19%
Updated 1 weeks ago
Swift
78%
MIT

Frog

AI Assistants · Productivity · Voice AI

47

An open-source, on-device Mac desktop pet that types what you say, takes meeting notes with speaker labels, and talks back — a private alternative to Wispr Flow and Granola.

View details
52
Repo Health
65
Technical
91
Dependency
Built with
Swift 78%
JavaScript 20%
Updated 3 weeks ago
JavaScript
65%
Other

GDevelop

Design Tools · Developer Tools · Game Development

26,937

No-code, open-source game engine for building 2D, 3D and multiplayer games — publish to iOS, Android, Steam and the web.

View details
93
Repo Health
82
Technical
61
Dependency
Built with
JavaScript 65%
C++ 23%
TypeScript 11%
Updated 4 days ago
Ruby
67%
Other

GitLab

Developer Tools · Devops

24,552

The complete DevOps platform that unifies Git hosting, CI/CD, issue tracking, and security scanning into a single self-hostable application.

View details
87
Repo Health
86
Technical
67
Dependency
Built with
Ruby 67%
JavaScript 20%
Updated 4 days ago
TypeScript
71%
Other

highlight.io

Analytics · Developer Tools · Monitoring

9,378

Open-source full-stack monitoring that unifies session replay, error tracking, logging, and distributed tracing so you can stop context-switching between tools.

View details
67
Repo Health
78
Technical
65
Dependency
Built with
TypeScript 71%
Go 16%
Updated 1 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers