A fast 2D rendering library for the web that draws graphics, sprites and text with WebGL and WebGPU.
mrdoob/three.js
A JavaScript 3D library that makes it easier to build and render 3D scenes in the browser with WebGL and WebGPU.
- Stars
- 116,683
- Forks
- 36,715
- Open issues
- 392
- Last commit
- 16 hours ago
What is it?
Three.js is a general-purpose JavaScript 3D library aimed at being easy to use and lightweight across browsers. It provides scenes, cameras, geometries, materials and renderers so developers can create 3D content without writing raw WebGL code directly.
The core builds include WebGL and WebGPU renderers, while SVG and CSS3D renderers are available as addons. A minimal example creates a scene, a camera and a cube, then animates it with a render loop.
The project publishes to npm as the package "three" and can also be loaded directly in the browser. Official examples, documentation and a manual are hosted on its website.
Key features
- 01Scene graph with cameras, geometries, materials and meshes
- 02WebGL and WebGPU renderers in the core build
- 03SVG and CSS3D renderers available as addons
- 04Available on npm and usable directly in the browser
Use cases
- Building interactive 3D visualizations or product viewers on the web
- Creating browser-based games or animated 3D scenes
- Developing WebXR experiences for AR and VR devices
Quick start
- 1
Shallow-clone the repository to reduce download size
git clone --depth=1 https://github.com/mrdoob/three.js.git - 2
Import THREE in a JavaScript file and create a scene, camera, and WebGL renderer as shown in the README usage example
- 3
Open the page in a browser to see the rotating cube
Things to know
- A full clone of the repository with all history is about 2 GB.
Topics
FAQ
- What is three.js?
- A JavaScript 3D library that makes it easier to build and render 3D scenes in the browser with WebGL and WebGPU. Three.js is a general-purpose JavaScript 3D library aimed at being easy to use and lightweight across browsers. It provides scenes, cameras, geometries, materials and renderers so developers can create 3D content without writing raw WebGL code directly.
- Is three.js free to use? What license does it have?
- three.js is open source under the MIT license. Check the license terms before using it in commercial products.
- Is three.js still maintained?
- Actively maintained. The last commit to three.js was on Oct 20, 2026.
- What can I use three.js for?
- Building interactive 3D visualizations or product viewers on the web Creating browser-based games or animated 3D scenes Developing WebXR experiences for AR and VR devices
- How do I install three.js?
- Shallow-clone the repository to reduce download size: git clone --depth=1 https://github.com/mrdoob/three.js.git Import THREE in a JavaScript file and create a scene, camera, and WebGL renderer as shown in the README usage example Open the page in a browser to see the rotating cube
- Where can I get three.js?
- The source code and installation instructions are on GitHub: https://github.com/mrdoob/three.js
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A collection of ready-made React helper components and hooks for building 3D scenes with react-three-fiber.
A React wrapper for the postprocessing library that lets react-three-fiber scenes apply post-processing effects declaratively as JSX components.
GPU.js transpiles simple JavaScript functions into GPU shader code so they run on the GPU in browsers and Node.js, falling back to plain JavaScript.
A cross-platform Java game development framework built on OpenGL ES for desktop, Android, web, and iOS games.
A .NET framework for building cross-platform 2D and 3D games in C#, re-implementing Microsoft's discontinued XNA Framework.