OSS TanbouSign in with GitHub

compose 3D scenes in the browser and render them with WebGL or WebGPU

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
116,205
Primary language
JavaScript
License
MIT
Repository last updated
Oct 4, 2026
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.

Sources: [2][1]

Best fit

Fits interactive 3D for product views, data displays, and game prototypes

Use it for web experiences that combine camera interaction, animation, and 3D model display. With npm and a build tool such as Vite, the core and selected addons integrate as ES Modules in an application.

Sources: [2][1]

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.

Sources: [2][1][4]

Official sources

  1. [1]three.js r186 README(2026-10-04)
  2. [2]three.js r186 Installation manual(2026-10-04)
  3. [3]three.js r186 package metadata(2026-10-04)
  4. [4]Vite 8.3.2 package metadata(2026-10-04)
  5. [5]three.js r186 release(2026-10-04)
  6. [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. 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. 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. 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
Check the official README

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

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
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?