← All libraries

Three.js

JavaScript
↗ Official site

3D & creative coding

The standard library for 3D graphics in the browser.

What it does

Three.js lets you render 3D scenes, objects, lights, and effects directly in the browser using WebGL. It's the foundation of most browser-based 3D experiences.

When to use it

Use this when you need custom 3D graphics, interactive 3D scenes, or WebGL effects.

Real example

You want a rotating 3D product model on a landing page hero. Prompt: 'Use Three.js to load a GLTF model from /model.glb, place it in the center of the scene, add an OrbitControls so the user can drag to rotate, and animate it with a slow auto-rotation on Y axis.'

Good to know

Has a steep learning curve. If you just need a 3D product viewer, consider a higher-level wrapper like Spline instead.

Alternatives

Babylon.js

Install

$ npm install three

Use cases

3D graphicsWebGLinteractive artproduct visualization

Language

JavaScript

Category

3D & creative coding

More in 3D & creative coding

Other tools in the same category