Skip to content
Agents tracked: 502 Releases (7d): 613 Agent status: 4 with issuesSince last limit reset: Claude 7d · Codex 5d For AI agents: Markdown Updated Nov 18, 2026

three.js examples

by three.js authors (mrdoob)

Hundreds of official three.js WebGL/WebGPU examples (shaders, particles, post-processing, loaders) with full source in the repo's examples folder.

Web animation examples and effects Code libraryOpen source3dabstractdark

GitHub repoWebsite
Three scenes drawn with three.js on one page; a wave of colored dots as a hero background, a metal-like knot lit by the built-in room lighting addon, and 225 bars drawn as one object.
Made by AgentGid with three 0.187.0 (npm). three.js is under the MIT license, which allows showing its output. The demo uses only shapes made in code, no example models or textures.

2. Commercial use: raw.githubusercontent.com

“to use, copy, modify, merge, publish, distribute, sublicense, and/or sell”

The three.js code and example code are MIT; example models and textures need their own check.

raw.githubusercontent.com

License checked Nov 5, 2026 against 1 official page. Tap a verdict to see its source. How we checked Report an error

three.js examples: working 3D scenes to copy

three.js is a free code library that draws 3D scenes in a web page, and its site has hundreds of small working examples, from particle waves to 3D models. You or your AI assistant open one, see its full code and copy the parts you need into your own site. The code is free for paid projects; some example models and pictures have their own licenses.

Where you can use it

Moving background for a landing page

Put a slowly moving 3D scene, like a wave of dots, behind the headline of your home page. The text stays on top and clickable.

A 3D model of your product

Show a product, a building or a character as a 3D model that loads on the page. The docs advise the glTF file format, which many 3D apps can export.

Let visitors turn and zoom the model

Add mouse and touch controls so people can spin a model around and zoom in. Controls, loaders and effects come with three.js and only need to be imported.

Start from an example that already works

Find an effect close to what you want in the examples gallery, open its code, and change colors, shapes and speed. This is faster than starting from an empty page.

Many objects in one scene Idea

Draw hundreds of bars, trees or seats at once, for example a 3D chart or a seating map, without slowing the page down.

As reported by three.js authors (mrdoob): The current builds include WebGL and WebGPU renderers.

three.js examples popularity

82 / 100
Gid Score, same scale as developer tools
118,722
GitHub stars
36.6M
npm downloads, last 7 days
+49.3% in 4 weeks
144
AI-agent projects using it, from our repo scan of 4,817
three.js examples: downloads per weeknpm, three 36,636,204
three.js examples: GitHub starsmrdoob/three.js 118,722

Downloads from api.npmjs.org, stars from GitHub, checked Nov 17, 2026. How the Gid Score is calculated

How to start

Tell your AI assistant

“Make a hero background with three.js 0.187.0 from npm, like the points-wave example, a full-window canvas behind the text with pointer-events none, pinned versions, and dispose of the geometry and material when the page section is removed.”

Show codeStep 1 or Step 2

Install three.js and the Vite build tool in your project folder.

# three.js
npm install --save three
# vite
npm install --save-dev vite

Mistakes to avoid

Load three from one version or CDN and the addons (OrbitControls, GLTFLoader) from another
Pin one version for everything, e.g. "three": ".../three@0.187.0/build/three.module.js" and "three/addons/": ".../three@0.187.0/examples/jsm/"

Mixed versions or sources can load duplicate code or break the page.

Open index.html by double-click (file://) to test the scene
Run a local server, e.g. npx vite or npx serve ., and open the localhost address

Module imports and loading models or textures do not work from a double-clicked file.

scene.remove(mesh) and expect the memory to be freed
Also call mesh.geometry.dispose(), mesh.material.dispose() and texture.dispose() for each texture you no longer use

three.js does not free graphics memory by itself.

import * as THREE from 'three' and then new THREE.WebGPURenderer()
import * as THREE from 'three/webgpu' for the WebGPU renderer

The WebGPU renderer lives in a different build file.

Ship a model or texture copied from the examples folder in a paid product
Check the license note next to each example file, or use your own or CC0 models

Example assets are not all under MIT; some are non-commercial.

License

MIT license. The three.js code is free for personal and paid projects under the MIT license, with no visible credit needed. Keep its short license notice in copies of the code. Models, pictures and sounds used by the examples are not all free; check each one.

Commercial use
Yes

“to use, copy, modify, merge, publish, distribute, sublicense, and/or sell” raw.githubusercontent.com

Credit
Not needed

“The above copyright notice and this permission notice shall be included in all” raw.githubusercontent.com

Inside your app or game
Can ship inside your app

“to use, copy, modify, merge, publish, distribute, sublicense, and/or sell” raw.githubusercontent.com

Pass the files on to your users
Allowed

“to use, copy, modify, merge, publish, distribute, sublicense, and/or sell” raw.githubusercontent.com

AI training
Not stated
Bots and bulk downloads
Not stated

AllowedWith conditionsNot allowedNot stated or not checked yet

Is three.js examples free for commercial use? The full answer Not legal advice. Check the license page before you ship.

For your agent

License rules tell your agent what it may do with three.js examples. Paste them into your prompt or AGENTS.md.

License rules
- three.js examples (Web animation examples and effects, Video references and motion backgrounds, 3D models). Hundreds of official three.js WebGL/WebGPU examples (shaders, particles, post-processing, loaders) with full source in the repo's examples folder. Price: free; commercial use OK; no credit needed. Style: 3d, abstract, dark.
  Connect: npm three.
  Get files: Open an example, then copy its HTML/JS from github.com/mrdoob/three.js/tree/dev/examples; npm install three (html, js).
  Not allowed: Example assets may have their own licenses
  Rule: Keep the MIT notice if you redistribute the code.
  Rule: Models, textures and sounds used by examples are separate files; do not assume they share the code's MIT license.
  License: https://raw.githubusercontent.com/mrdoob/three.js/dev/LICENSE (checked 2026-11-05; details: https://agentgid.com/assets/threejs-examples/)
Can an agent use it by itself?
Yes.

Agent copies the code, snippet or prompt from the page (no account).

Install
npm install three
How an agent gets files
Open an example, then copy its HTML/JS from github.com/mrdoob/three.js/tree/dev/examples; npm install three.

Formats: html, js

Repository
API, key or account
Not needed. Everything runs on your side.
MCP server
None found
Credit line, if you want one
3D: three.js (threejs.org), MIT License
This card for machines

Alternatives

three.js examples This page

Free Commercial OK npm

React Three Fiber examples

Pick the React Three Fiber examples when your site is a React app and you want 3D scenes written as React components.

Free Commercial OK npm

OGL examples

Pick the OGL examples for a smaller library with commented examples that suit light hero backgrounds.

Free Commercial OK npm

Paper Shaders

Pick Paper Shaders for ready gradient, grain and glass effects as components, without building a 3D scene.

Free Commercial OK npm

Lenis

Lightweight smooth-scroll library often paired with GSAP ScrollTrigger and WebGL scroll effects.

Free Commercial OK npm

Animate.css

Ready-made CSS keyframe animations (bounce, fade, slide, zoom, attention seekers) added with one class name.

Free With conditions npm

All web animation examples and effects

Questions

Can I use code from the three.js examples in a paid product?

Yes. The code is under the MIT license, which allows use and sale of copies; keep the license notice in copies of the code.

Can I also use the 3D models from the examples?

Not always. Each model has its own license, and some, like the damaged helmet, are for non-commercial use only.

Which 3D file format should I use?

glTF (.glb or .gltf), which the docs recommend where possible.

Does it work on devices without the newest graphics support?

The newer WebGPU renderer falls back to WebGL 2 when a device or browser has no WebGPU; the classic WebGL renderer is also available.

Can the 3D scene sit behind my page text?

Yes. The docs show a canvas fixed behind the content or an iframe as the page background.