{
 "slug": "threejs-examples",
 "name": "three.js examples",
 "author": "three.js authors (mrdoob)",
 "density": "full",
 "status": "active",
 "status_note": null,
 "alternatives_page": null,
 "one_liner": "Hundreds of official three.js WebGL/WebGPU examples (shaders, particles, post-processing, loaders) with full source in the repo's examples folder.",
 "category": {
  "slug": "motion-examples",
  "name": "Web animation examples and effects"
 },
 "tags": [
  "Code library",
  "Open source"
 ],
 "styles": [
  "3d",
  "abstract",
  "dark"
 ],
 "logo_url": "https://agentgid.com/media/avatars/mrdoob.png",
 "logo_letter": "T",
 "links": {
  "repo": "https://github.com/mrdoob/three.js",
  "website": "https://threejs.org/examples/",
  "api_docs": null
 },
 "preview": {
  "kind": "image_grid",
  "src": "https://agentgid.com/assets/threejs-examples/demo.jpg",
  "alt": "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.",
  "caption": "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."
 },
 "verdicts": [
  {
   "key": "price",
   "label": "Price",
   "value": "Free",
   "status": "yes",
   "sub": "No paid plan",
   "quote": null,
   "note": "Fully free.",
   "source": {
    "label": "threejs.org/examples",
    "url": "https://threejs.org/examples/"
   },
   "n": 1
  },
  {
   "key": "commercial",
   "label": "Commercial use",
   "value": "Yes",
   "status": "yes",
   "sub": "MIT",
   "quote": "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
   "note": "The three.js code and example code are MIT; example models and textures need their own check.",
   "source": {
    "label": "raw.githubusercontent.com",
    "url": "https://raw.githubusercontent.com/mrdoob/three.js/dev/LICENSE"
   },
   "n": 2
  },
  {
   "key": "credit",
   "label": "Credit the author",
   "value": "Not needed",
   "status": "yes",
   "sub": "Keep the notice in code copies",
   "quote": "The above copyright notice and this permission notice shall be included in all",
   "note": "No credit on screen. Keep the license notice inside the code you ship.",
   "source": {
    "label": "raw.githubusercontent.com",
    "url": "https://raw.githubusercontent.com/mrdoob/three.js/dev/LICENSE"
   },
   "n": 3
  },
  {
   "key": "agent_access",
   "label": "Agent access",
   "value": "npm package",
   "status": "info",
   "sub": "Installs without a key",
   "quote": null,
   "note": "An agent can install it by itself with npm install three. No key or account is needed.",
   "source": {
    "label": "github.com/mrdoob/three.js",
    "url": "https://github.com/mrdoob/three.js"
   },
   "n": 4
  }
 ],
 "license": {
  "name": "MIT",
  "url": "https://raw.githubusercontent.com/mrdoob/three.js/dev/LICENSE",
  "summary": "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.",
  "pages_read": 1,
  "rules": [
   "Keep the MIT notice if you redistribute the code.",
   "Models, textures and sounds used by examples are separate files; do not assume they share the code's MIT license."
  ],
  "rows": [
   {
    "label": "Commercial use",
    "value": "Yes",
    "status": "yes",
    "quote": "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
    "source": {
     "label": "raw.githubusercontent.com",
     "url": "https://raw.githubusercontent.com/mrdoob/three.js/dev/LICENSE"
    },
    "note": null
   },
   {
    "label": "Credit",
    "value": "Not needed",
    "status": "yes",
    "quote": "The above copyright notice and this permission notice shall be included in all",
    "source": {
     "label": "raw.githubusercontent.com",
     "url": "https://raw.githubusercontent.com/mrdoob/three.js/dev/LICENSE"
    },
    "note": null
   },
   {
    "label": "Inside your app or game",
    "value": "Can ship inside your app",
    "status": "yes",
    "quote": "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
    "source": {
     "label": "raw.githubusercontent.com",
     "url": "https://raw.githubusercontent.com/mrdoob/three.js/dev/LICENSE"
    },
    "note": null
   },
   {
    "label": "Pass the files on to your users",
    "value": "Allowed",
    "status": "yes",
    "quote": "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
    "source": {
     "label": "raw.githubusercontent.com",
     "url": "https://raw.githubusercontent.com/mrdoob/three.js/dev/LICENSE"
    },
    "note": null
   },
   {
    "label": "AI training",
    "value": "Not stated",
    "status": "unknown",
    "quote": null,
    "source": null,
    "note": null
   },
   {
    "label": "Bots and bulk downloads",
    "value": "Not stated",
    "status": "unknown",
    "quote": null,
    "source": null,
    "note": null
   }
  ],
  "checked_at": "2026-11-05",
  "commercial_use_page": "https://agentgid.com/assets/threejs-examples/commercial-use/"
 },
 "overview": {
  "heading": "three.js examples: working 3D scenes to copy",
  "body": "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."
 },
 "uses": [
  {
   "title": "Moving background for a landing page",
   "text": "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.",
   "idea": false,
   "image": null
  },
  {
   "title": "A 3D model of your product",
   "text": "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.",
   "idea": false,
   "image": null
  },
  {
   "title": "Let visitors turn and zoom the model",
   "text": "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.",
   "idea": false,
   "image": null
  },
  {
   "title": "Start from an example that already works",
   "text": "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.",
   "idea": false,
   "image": null
  },
  {
   "title": "Many objects in one scene",
   "text": "Draw hundreds of bars, trees or seats at once, for example a 3D chart or a seating map, without slowing the page down.",
   "idea": true,
   "image": null
  }
 ],
 "start": {
  "prompt": "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.",
  "install": null,
  "install_note": null,
  "code": [
   {
    "tab": "Step 1",
    "intro": "Install three.js and the Vite build tool in your project folder.",
    "source": "# three.js\nnpm install --save three\n# vite\nnpm install --save-dev vite"
   },
   {
    "tab": "Step 2",
    "intro": "Make the three basic parts of every scene: a scene, a camera and a renderer that draws the picture.",
    "source": "import * as THREE from 'three';\nconst scene = new THREE.Scene();\nconst camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );\nconst renderer = new THREE.WebGLRenderer();\nrenderer.setSize( window.innerWidth, window.innerHeight );\ndocument.body.appendChild( renderer.domElement );"
   }
  ]
 },
 "mistakes": [
  {
   "dont": "Load three from one version or CDN and the addons (OrbitControls, GLTFLoader) from another",
   "fix": "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/\"",
   "why": "Mixed versions or sources can load duplicate code or break the page.",
   "dont_code": false,
   "fix_code": false
  },
  {
   "dont": "Open index.html by double-click (file://) to test the scene",
   "fix": "Run a local server, e.g. npx vite or npx serve ., and open the localhost address",
   "why": "Module imports and loading models or textures do not work from a double-clicked file.",
   "dont_code": false,
   "fix_code": false
  },
  {
   "dont": "scene.remove(mesh) and expect the memory to be freed",
   "fix": "Also call mesh.geometry.dispose(), mesh.material.dispose() and texture.dispose() for each texture you no longer use",
   "why": "three.js does not free graphics memory by itself.",
   "dont_code": false,
   "fix_code": false
  },
  {
   "dont": "import * as THREE from 'three' and then new THREE.WebGPURenderer()",
   "fix": "import * as THREE from 'three/webgpu' for the WebGPU renderer",
   "why": "The WebGPU renderer lives in a different build file.",
   "dont_code": true,
   "fix_code": true
  },
  {
   "dont": "Ship a model or texture copied from the examples folder in a paid product",
   "fix": "Check the license note next to each example file, or use your own or CC0 models",
   "why": "Example assets are not all under MIT; some are non-commercial.",
   "dont_code": false,
   "fix_code": false
  }
 ],
 "agent": {
  "self_serve": true,
  "self_serve_text": "Agent copies the code, snippet or prompt from the page (no account)",
  "install": "npm install three",
  "repo": "https://github.com/mrdoob/three.js",
  "api_docs": null,
  "api_account": "Not needed. Everything runs on your side.",
  "get_files": "Open an example, then copy its HTML/JS from github.com/mrdoob/three.js/tree/dev/examples; npm install three.",
  "formats": [
   "html",
   "js"
  ],
  "limits": null,
  "mcp": null,
  "mcp_url": null,
  "credit_line": "3D: three.js (threejs.org), MIT License",
  "rules_text": "- 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.\n  Connect: npm three.\n  Get files: Open an example, then copy its HTML/JS from github.com/mrdoob/three.js/tree/dev/examples; npm install three (html, js).\n  Not allowed: Example assets may have their own licenses\n  Rule: Keep the MIT notice if you redistribute the code.\n  Rule: Models, textures and sounds used by examples are separate files; do not assume they share the code's MIT license.\n  License: https://raw.githubusercontent.com/mrdoob/three.js/dev/LICENSE (checked 2026-11-05; details: https://agentgid.com/assets/threejs-examples/)",
  "agent_md": "https://agentgid.com/assets/threejs-examples/agent.md",
  "card_json": "https://agentgid.com/assets/threejs-examples/card.json"
 },
 "popularity": {
  "gid_score": 82,
  "stars": 118722,
  "downloads_7d": 36636204,
  "downloads_7d_label": "36.6M",
  "downloads_change_4w_pct": 49.3,
  "eco": "npm",
  "package": "three",
  "repo": "mrdoob/three.js",
  "agent_projects": 144,
  "agent_projects_total": 4817,
  "downloads_unconfirmed": false,
  "series": {
   "downloads_weekly": [
    [
     "2025-11-17",
     3160096
    ],
    [
     "2025-11-24",
     2835246
    ],
    [
     "2025-12-01",
     3242706
    ],
    [
     "2025-12-08",
     3336891
    ],
    [
     "2025-12-15",
     3187759
    ],
    [
     "2025-12-22",
     2160122
    ],
    [
     "2025-12-29",
     2145512
    ],
    [
     "2026-01-05",
     3531551
    ],
    [
     "2026-01-12",
     4077165
    ],
    [
     "2026-01-19",
     4319212
    ],
    [
     "2026-01-26",
     4603888
    ],
    [
     "2026-02-02",
     6155222
    ],
    [
     "2026-02-09",
     4999909
    ],
    [
     "2026-02-16",
     5461383
    ],
    [
     "2026-02-23",
     6822044
    ],
    [
     "2026-03-02",
     6655261
    ],
    [
     "2026-03-09",
     6653007
    ],
    [
     "2026-03-16",
     9411333
    ],
    [
     "2026-03-23",
     9135247
    ],
    [
     "2026-03-30",
     9415356
    ],
    [
     "2026-04-06",
     7858261
    ],
    [
     "2026-04-13",
     8339435
    ],
    [
     "2026-04-20",
     8811580
    ],
    [
     "2026-04-27",
     8753094
    ],
    [
     "2026-05-04",
     8391202
    ],
    [
     "2026-05-11",
     8957373
    ],
    [
     "2026-05-18",
     9319539
    ],
    [
     "2026-05-25",
     9453344
    ],
    [
     "2026-06-01",
     10676287
    ],
    [
     "2026-06-08",
     11636357
    ],
    [
     "2026-06-15",
     11848028
    ],
    [
     "2026-06-22",
     11594046
    ],
    [
     "2026-06-29",
     11112826
    ],
    [
     "2026-07-06",
     12404941
    ],
    [
     "2026-07-13",
     12882609
    ],
    [
     "2026-07-20",
     13449269
    ],
    [
     "2026-07-27",
     13795847
    ],
    [
     "2026-08-03",
     14218946
    ],
    [
     "2026-08-10",
     14331869
    ],
    [
     "2026-08-17",
     14259444
    ],
    [
     "2026-08-24",
     15297300
    ],
    [
     "2026-08-31",
     16729533
    ],
    [
     "2026-09-07",
     12082867
    ],
    [
     "2026-09-14",
     15069392
    ],
    [
     "2026-09-21",
     19606993
    ],
    [
     "2026-09-28",
     24326206
    ],
    [
     "2026-10-05",
     21082279
    ],
    [
     "2026-10-12",
     18767894
    ],
    [
     "2026-10-19",
     20911801
    ],
    [
     "2026-10-26",
     32733258
    ],
    [
     "2026-11-02",
     34811899
    ],
    [
     "2026-11-09",
     36636204
    ]
   ],
   "stars": [
    [
     "2026-11-07",
     117815
    ],
    [
     "2026-11-08",
     117845
    ],
    [
     "2026-11-09",
     117910
    ],
    [
     "2026-11-10",
     118013
    ],
    [
     "2026-11-11",
     118111
    ],
    [
     "2026-11-12",
     118215
    ],
    [
     "2026-11-13",
     118269
    ],
    [
     "2026-11-14",
     118344
    ],
    [
     "2026-11-15",
     118459
    ],
    [
     "2026-11-16",
     118582
    ],
    [
     "2026-11-17",
     118722
    ]
   ]
  },
  "stars_flat_since": null,
  "updated_at": "2026-11-17"
 },
 "alternatives": [
  {
   "slug": "threejs-examples",
   "name": "three.js examples",
   "why": null,
   "current": true,
   "price": "Free",
   "commercial": {
    "value": "Commercial OK",
    "status": "yes"
   },
   "access": "npm"
  },
  {
   "slug": "react-three-fiber-examples",
   "name": "React Three Fiber examples",
   "why": "Pick the React Three Fiber examples when your site is a React app and you want 3D scenes written as React components.",
   "current": false,
   "price": "Free",
   "commercial": {
    "value": "Commercial OK",
    "status": "yes"
   },
   "access": "npm"
  },
  {
   "slug": "ogl-examples",
   "name": "OGL examples",
   "why": "Pick the OGL examples for a smaller library with commented examples that suit light hero backgrounds.",
   "current": false,
   "price": "Free",
   "commercial": {
    "value": "Commercial OK",
    "status": "yes"
   },
   "access": "npm"
  },
  {
   "slug": "paper-shaders",
   "name": "Paper Shaders",
   "why": "Pick Paper Shaders for ready gradient, grain and glass effects as components, without building a 3D scene.",
   "current": false,
   "price": "Free",
   "commercial": {
    "value": "Commercial OK",
    "status": "yes"
   },
   "access": "npm"
  },
  {
   "slug": "lenis",
   "name": "Lenis",
   "why": "Lightweight smooth-scroll library often paired with GSAP ScrollTrigger and WebGL scroll effects.",
   "current": false,
   "price": "Free",
   "commercial": {
    "value": "Commercial OK",
    "status": "yes"
   },
   "access": "npm"
  },
  {
   "slug": "animate-css",
   "name": "Animate.css",
   "why": "Ready-made CSS keyframe animations (bounce, fade, slide, zoom, attention seekers) added with one class name.",
   "current": false,
   "price": "Free",
   "commercial": {
    "value": "With conditions",
    "status": "cond"
   },
   "access": "npm"
  }
 ],
 "faq": [
  {
   "q": "Can I use code from the three.js examples in a paid product?",
   "a": "Yes. The code is under the MIT license, which allows use and sale of copies; keep the license notice in copies of the code."
  },
  {
   "q": "Can I also use the 3D models from the examples?",
   "a": "Not always. Each model has its own license, and some, like the damaged helmet, are for non-commercial use only."
  },
  {
   "q": "Which 3D file format should I use?",
   "a": "glTF (.glb or .gltf), which the docs recommend where possible."
  },
  {
   "q": "Does it work on devices without the newest graphics support?",
   "a": "The newer WebGPU renderer falls back to WebGL 2 when a device or browser has no WebGPU; the classic WebGL renderer is also available."
  },
  {
   "q": "Can the 3D scene sit behind my page text?",
   "a": "Yes. The docs show a canvas fixed behind the content or an iframe as the page background."
  }
 ],
 "at_a_glance": {
  "latest_version": "0.187.0",
  "last_release": "2026-10-30",
  "last_commit": "2026-11-17",
  "runtime": "A browser with WebGL 2 (WebGPURenderer adds WebGPU and falls back to WebGL 2); addons ship in the same package under three/addons/; a local server or a build tool such as Vite during development.",
  "key_needed": false,
  "formats": "html, js"
 },
 "good_to_know": [
  "Some 3D models in the examples are for non-paying projects only, such as the helmet model. Use your own models or free ones in paid work.",
  "Pages with three.js need a small local web server while you build them; opening the file by double-click breaks some features.",
  "Memory used by shapes, materials and pictures is not freed by itself. Pages that add and remove scenes must free it in code, or they get slower.",
  "Load all three.js files from one version and one place. If you load them from an outside server and it goes down, your page stops working too.",
  "Downloading the whole project with all its history is about 2 GB. To copy one example, open its code page instead."
 ],
 "stack_snippets": [],
 "claims": [
  "The current builds include WebGL and WebGPU renderers"
 ],
 "checked": {
  "license_read": "2026-11-05",
  "overview_checked": "2026-11-09",
  "numbers_updated": "2026-11-17",
  "sources": [
   {
    "label": "threejs.org",
    "url": "https://threejs.org/"
   },
   {
    "label": "threejs.org/examples",
    "url": "https://threejs.org/examples/"
   },
   {
    "label": "threejs.org/examples/files.json",
    "url": "https://threejs.org/examples/files.json"
   },
   {
    "label": "threejs.org",
    "url": "https://threejs.org/examples/webgl_points_waves.html"
   },
   {
    "label": "threejs.org",
    "url": "https://threejs.org/examples/webgl_loader_gltf.html"
   },
   {
    "label": "threejs.org/docs",
    "url": "https://threejs.org/docs/"
   },
   {
    "label": "threejs.org/manual",
    "url": "https://threejs.org/manual/"
   },
   {
    "label": "threejs.org/manual/list.json",
    "url": "https://threejs.org/manual/list.json"
   },
   {
    "label": "threejs.org",
    "url": "https://threejs.org/manual/pages/installation.html"
   },
   {
    "label": "threejs.org",
    "url": "https://threejs.org/manual/pages/creating-a-scene.html"
   },
   {
    "label": "threejs.org",
    "url": "https://threejs.org/manual/pages/loading-3d-models.html"
   },
   {
    "label": "threejs.org",
    "url": "https://threejs.org/manual/pages/how-to-dispose-of-objects.html"
   },
   {
    "label": "threejs.org/manual/pages/tips.html",
    "url": "https://threejs.org/manual/pages/tips.html"
   },
   {
    "label": "threejs.org",
    "url": "https://threejs.org/manual/pages/webgpurenderer.html"
   },
   {
    "label": "threejs.org/manual/pages/faq.html",
    "url": "https://threejs.org/manual/pages/faq.html"
   },
   {
    "label": "threejs.org",
    "url": "https://threejs.org/manual/pages/rendering-on-demand.html"
   },
   {
    "label": "threejs.org",
    "url": "https://threejs.org/manual/pages/libraries-and-plugins.html"
   },
   {
    "label": "README on GitHub",
    "url": "https://github.com/mrdoob/three.js/blob/dev/README.md"
   },
   {
    "label": "LICENSE on GitHub",
    "url": "https://github.com/mrdoob/three.js/blob/dev/LICENSE"
   },
   {
    "label": "README on GitHub",
    "url": "https://github.com/mrdoob/three.js/blob/dev/examples/models/gltf/DamagedHelmet/README.md"
   },
   {
    "label": "npm: three/latest",
    "url": "https://registry.npmjs.org/three/latest"
   },
   {
    "label": "raw.githubusercontent.com",
    "url": "https://raw.githubusercontent.com/mrdoob/three.js/dev/LICENSE"
   }
  ],
  "unverified": null
 },
 "user_reports": null,
 "url": "https://agentgid.com/assets/threejs-examples/",
 "note": "Written by AgentGid from the official pages in checked.sources; quotes are copied from those pages. status: yes | cond | no | unknown | info. Prices and vendor claims are as reported on the checked date. Not legal advice."
}
