{
 "kind": "tool",
 "slug": "three",
 "path": "tools/three/",
 "name": "Three.js",
 "maker": null,
 "density": "profile",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "3D and graphics",
   "tools/3d-graphics/"
  ]
 ],
 "lead": "JavaScript 3D library for creating interactive 3D graphics in browsers.",
 "chips": [
  {
   "label": "3D and graphics",
   "path": "tools/3d-graphics/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install three"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/mrdoob/three.js"
  },
  {
   "label": "Website",
   "href": "https://threejs.org/"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from npm.",
   "src": "https://github.com/mrdoob/three.js"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 24, 2026",
   "note": "Latest GitHub release Oct 30, 2026. ",
   "src": "https://github.com/mrdoob/three.js"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "150 projects",
   "status": "info",
   "sub": "#1 of 63 in its category",
   "note": "Dependency in 150 public GitHub projects set up for AI coding agents that we scanned (2.4%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Docs for agents",
   "status": "yes",
   "sub": "llms.txt",
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": "https://threejs.org/docs/llms.txt"
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What Three.js does",
   "parts": [
    {
     "t": "prose",
     "text": "Three.js is a general-purpose browser 3D library that ships two renderers, a default WebGL one and a WebGPU one with its own node-based shading language, and it publishes explicit instructions for language models that write code against it."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "Three.js popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "94",
       "of": "/ 100",
       "l": "Gid Score, #2 overall"
      },
      {
       "n": "38.1M",
       "l": "downloads a week, npm"
      },
      {
       "n": "119K",
       "l": "GitHub stars"
      },
      {
       "n": "150",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How Three.js is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "Three.js is a dependency in 150 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (3.1% of the 4,867 JavaScript/TypeScript ones), #1 of 63 in 3d and graphics.",
      "Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 3,012; those are left out of every share on this page.",
      "The most used alternative in our scan is OGL (16 projects).",
      "Projects that use it most often also use Tailwind CSS (80.0%), React Three Fiber (47.3%), Framer Motion (44.0%).",
      "It is more common in projects set up for Roo Code (6.3%) than for GitHub Copilot (2.4%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "97 projects, 3.0%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "74 projects, 2.4%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "68 projects, 2.8%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "23 projects, 4.9%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      },
      {
       "l": "15 projects, 3.2%",
       "v": "OpenAI Codex",
       "path": "agents/openai-codex/"
      },
      {
       "l": "13 projects, 4.7%",
       "v": "Devin Desktop",
       "path": "agents/devin-desktop/"
      },
      {
       "l": "13 projects, 3.8%",
       "v": "OpenCode",
       "path": "agents/opencode/"
      },
      {
       "l": "7 projects, 6.3%",
       "v": "Roo Code",
       "path": "agents/roo-code/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 80.0% of its projects",
       "v": "Tailwind CSS",
       "path": "tools/tailwindcss/"
      },
      {
       "l": "In 47.3% of its projects",
       "v": "React Three Fiber",
       "path": "tools/react-three/"
      },
      {
       "l": "In 44.0% of its projects",
       "v": "Framer Motion",
       "path": "tools/framer-motion/"
      },
      {
       "l": "In 76.0% of its projects",
       "v": "React",
       "path": "tools/react/"
      },
      {
       "l": "In 56.7% of its projects",
       "v": "clsx",
       "path": "tools/clsx/"
      },
      {
       "l": "In 56.0% of its projects",
       "v": "Lucide React",
       "path": "tools/lucide-react/"
      },
      {
       "l": "In 54.0% of its projects",
       "v": "Tailwind Merge",
       "path": "tools/tailwind-merge/"
      },
      {
       "l": "In 72.0% of its projects",
       "v": "ESLint",
       "path": "tools/eslint/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "Three.js in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "WebGL and WebGPU from one package",
       "v": "Both renderers ship in the main builds. The project's LLM guide says to reach for <code>WebGPURenderer</code> when you need TSL custom materials, compute shaders or node-based materials."
      },
      {
       "l": "WebGL path is the documented default",
       "v": "The docs describe <code>WebGLRenderer</code> as the mature option, with the widest browser support. They also say most examples and tutorials use it."
      },
      {
       "l": "TSL shaders run on either backend",
       "v": "TSL builds materials from composable nodes instead of GLSL strings. The docs say the same TSL material works on both the WebGL and WebGPU backends."
      },
      {
       "l": "Wide addon catalog for file formats",
       "v": "The docs index lists addon exporters for glTF, OBJ, PLY, STL, USDZ, DRACO, EXR and KTX2. They also list a long set of loaders, including GLTFLoader, FBXLoader and DRACOLoader."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Old CDN snippets are out of date",
       "v": "Many copy-paste examples load a fixed old build through a plain <code>&lt;script&gt;</code> tag. The docs mark that pattern as wrong and ask for import maps pointing at the latest version."
      },
      {
       "l": "WebGPU setup differs from WebGL",
       "v": "The WebGPU renderer comes from a different entry point, <code>three/webgpu</code>. It also needs an awaited <code>init()</code> call before use. WebGL code does not carry over line for line."
      },
      {
       "l": "Deprecated APIs get removed",
       "v": "Releases are numbered (r187 is the latest listed). Each release links a migration guide section. The r187 notes remove code that was deprecated back in r177, so upgrades can break older code."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Scene, camera and an animated cube"
    },
    {
     "t": "tabs",
     "label": "Example",
     "items": [
      {
       "tab": "Javascript",
       "code": "import * as THREE from 'three';\n\nconst width = window.innerWidth, height = window.innerHeight;\n\n// init\n\nconst camera = new THREE.PerspectiveCamera( 70, width / height, 0.01, 10 );\ncamera.position.z = 1;\n\nconst scene = new THREE.Scene();\n\nconst geometry = new THREE.BoxGeometry( 0.2, 0.2, 0.2 );\nconst material = new THREE.MeshNormalMaterial();\n\nconst mesh = new THREE.Mesh( geometry, material );\nscene.add( mesh );\n\nconst renderer = new THREE.WebGLRenderer( { antialias: true } );\nrenderer.setSize( width, height );\nrenderer.setAnimationLoop( animate );\ndocument.body.appendChild( renderer.domElement );\n\n// animation\n\nfunction animate( time ) {\n\n\tmesh.rotation.x = time / 2000;\n\tmesh.rotation.y = time / 1000;\n\n\trenderer.render( scene, camera );\n\n}"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about Three.js",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "GitHub Sponsors: https://github.com/mrdoob",
        "GitHub Sponsors: https://github.com/HumanInteractive",
        "GitHub Sponsors: https://github.com/donmccurdy",
        "GitHub Sponsors: https://github.com/WestLangley",
        "27 GitHub sponsors"
       ]
      },
      {
       "title": "Agent Skills for it",
       "path": "skills/",
       "items": [
        "three-best-practices: Three.js performance optimization and best practices guidelines. Use when writing, reviewing, or optimizing Three.js code. Triggers on tasks"
       ]
      },
      {
       "title": "Packages around it",
       "items": [
        "tailwindcss: Utility-first CSS",
        "@react-three: React bindings for Three.js",
        "clsx: Class name helper",
        "framer-motion: UI animation",
        "react: UI library",
        "tailwind-merge: Tailwind class merging"
       ]
      },
      {
       "title": "More in 3D and graphics",
       "path": "tools/3d-graphics/",
       "items": [
        {
         "text": "Leaflet",
         "path": "tools/leaflet/"
        },
        {
         "text": "React Three Fiber",
         "path": "tools/react-three/"
        },
        {
         "text": "React Leaflet",
         "path": "tools/react-leaflet/"
        },
        {
         "text": "@napi-rs/canvas",
         "path": "tools/napi-rs-canvas/"
        },
        {
         "text": "Mapbox GL",
         "path": "tools/mapbox-gl/"
        },
        {
         "text": "MapLibre GL",
         "path": "tools/maplibre-gl/"
        },
        {
         "text": "Resvg-JS",
         "path": "tools/resvg-resvg-js/"
        },
        {
         "text": "node-canvas",
         "path": "tools/canvas/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "Three.js",
       "me": true,
       "facts": [
        "MIT",
        "Gid 94",
        "38.1M/wk"
       ]
      },
      {
       "name": "OGL",
       "why": "Lightweight WebGL library for 3D graphics rendering with minimal overhead.",
       "path": "tools/ogl/",
       "facts": [
        "Unlicense",
        "Gid 57",
        "1.2M/wk"
       ]
      },
      {
       "name": "Pixi.js",
       "why": "Fast 2D WebGL renderer for interactive graphics, games and animations.",
       "path": "tools/pixi-js/",
       "facts": [
        "MIT",
        "Gid 65",
        "2M/wk"
       ]
      }
     ],
     "more": "Compare Three.js with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "npm install three"
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## Three.js\n- In plain HTML, load `three` through an import map pointing at the latest version. Do not use old CDN `&lt;script&gt;` tags such as `r128/three.min.js`.\n- Map `three/addons/` as well. Import controls and loaders from it, for example `import { OrbitControls } from 'three/addons/controls/OrbitControls.js';`.\n- Default to `WebGLRenderer`. Switch to `WebGPURenderer` only when you need TSL materials, compute shaders or node-based materials.\n- For WebGPU, import from `three/webgpu` and `await renderer.init()` before rendering.\n- With `WebGPURenderer`, write custom materials in TSL (`three/tsl`), not raw GLSL or `onBeforeCompile` hacks.\n- Pair TSL with node materials such as `MeshStandardNodeMaterial` or `MeshPhysicalNodeMaterial`.\n- Before upgrading across releases, check the Migration Guide. Recent releases remove code deprecated in earlier ones.\n"
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm three"
  ],
  [
   "Category",
   "3D and graphics"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Latest version",
   "r187, October 30, 2026"
  ],
  [
   "On GitHub since",
   "March 2010"
  ],
  [
   "Gid Score",
   "94.5"
  ],
  [
   "Rank in category",
   "#1 of 63"
  ],
  [
   "GitHub",
   "mrdoob/three.js"
  ],
  [
   "Last change",
   "Nov 24, 2026"
  ]
 ],
 "good": [],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/mrdoob.png"
}