On this page
Overview
three.js is a JavaScript library for displaying 3D scenes in a browser. A common API composes scenes, cameras, geometry, materials, and rendering, then targets a WebGL or WebGPU renderer.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Compose scenes, cameras, geometry, and materials in JavaScript
The README's minimal example creates a PerspectiveCamera and Scene, builds a mesh from BoxGeometry and MeshNormalMaterial, and moves the cube in a WebGLRenderer animation loop. Applications describe scene elements and updates without assembling the lower-level graphics API directly.
Sources: [1]
Select loaders, controls, and post-processing from addons
The core provides the fundamentals of a 3D engine, while OrbitControls, GLTFLoader, post-processing, and other components are imported separately from three/addons. Current builds include WebGL and WebGPU renderers, with SVG and CSS3D renderers available as addons.
Best fit
Before adoption
Verify the local-server setup and target browsers
Serve the files through a local server instead of opening HTML directly so modules and assets work correctly. Keep the core and addons on the same three.js version and source. Test WebGL or WebGPU and performance on target browsers, and review the Migration Guide before upgrading releases. Vite 8.3.2, pinned by this guide, requires Node.js ^20.19.0 or 22.12.0 and newer.
Official sources
- [1]three.js r186 README(2026-10-04)
- [2]three.js r186 Installation manual(2026-10-04)
- [3]three.js r186 package metadata(2026-10-04)
- [4]Vite 8.3.2 package metadata(2026-10-04)
- [5]three.js r186 release(2026-10-04)
- [6]three.js r186 license(2026-10-04)
Supplemental curator note
It removes much of the renderer setup while leaving scene composition and the render loop under direct JavaScript control. Before adoption, test GPU and browser coverage on target devices and review migration notes for upgrades.
Try it in 3 steps
- 1
Create an npm project
Use Node.js ^20.19.0 or 22.12.0 and newer with npm, then initialize an empty working directory.
mkdir three-demo && cd three-demo && npm init -y - 2
Install three.js and Vite
Pin the dependencies to three 0.186.1 and Vite 8.3.2.
npm install --save three@0.186.1 && npm install --save-dev vite@8.3.2 - 3
Display a rotating cube
Open the printed local URL to see the cube, then press Ctrl+C when finished.
printf '%s\n' '<!doctype html><html lang="en"><head><meta charset="utf-8"><title>three.js demo</title><style>body{margin:0}</style></head><body><script type="module" src="/main.js"></script></body></html>' > index.html && printf '%s\n' 'import * as THREE from "three";' 'const scene=new THREE.Scene();' 'const camera=new THREE.PerspectiveCamera(70,innerWidth/innerHeight,0.01,10); camera.position.z=1;' 'const mesh=new THREE.Mesh(new THREE.BoxGeometry(0.2,0.2,0.2),new THREE.MeshNormalMaterial()); scene.add(mesh);' 'const renderer=new THREE.WebGLRenderer({antialias:true}); renderer.setSize(innerWidth,innerHeight); document.body.appendChild(renderer.domElement);' 'renderer.setAnimationLoop((time)=>{mesh.rotation.x=time/2000; mesh.rotation.y=time/1000; renderer.render(scene,camera);});' > main.js && npx vite --host 127.0.0.1
Growth
Growth trends · Last 30 days
116,205 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 209
- Open PRs
- 128
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- javascript
- 3d
- virtual-reality
- augmented-reality
- webgl
- webgl2
- webgpu
- webxr
- webaudio
- canvas
- svg
- html5
- Stars
- 116,205
- Forks
- 36,608
- Watchers
- 2,522
- Open issues
- 253
- Contributors
- 363
- Owner type
- User
- Primary language
- JavaScript
- License
- MIT
- Repository last updated
- Oct 4, 2026
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- OpenPencil8,736 Stars
1 shared tag(s) · 1 shared category(s)
Edit
TypeScript.figand.pendirectly while exposing the same design document to AI, CLI, MCP, and WebMCP automation - Grida2,655 Stars
1 shared tag(s) · 1 shared category(s)
Connect Canvas, SVG, Figma, and headless rendering in an open design stack
TypeScript - Phaser40,400 Stars
3 shared tag(s) · 1 shared category(s) · Same language
build HTML5 2D games around a WebGL-first renderer with scenes, physics, filters, and GPU layers
JavaScript - KAPLAY1,809 Stars
3 shared tag(s) · 1 shared category(s)
Build 2D games with composable APIs and a browser-based playground
TypeScript - GDevelop27,109 Stars
2 shared tag(s) · 2 shared category(s) · Same language
Create and export 2D, 3D, and multiplayer games with event-based no-code logic plus extensions and JavaScript
JavaScript - Babylon.js26,126 Stars
2 shared tag(s) · 2 shared category(s)
render interactive 3D scenes, games, and XR experiences in browsers through TypeScript or JavaScript with WebGL and WebGPU
TypeScript
Report incorrect information
Tell us if any listing information is incorrect or outdated.