Knowledge base from the Three.js (@three.js) documentation — the full API reference (Core + Addons + TSL). Use when building 3D/WebGL/WebGPU graphics with Three.js, looking up a class's constructor/properties/methods, choosing between similar components (cameras, lights, loaders, controls), writing TSL shader code, or referencing composition patterns and performance conventions.
Package: three | Chapters: 859 (799 API classes/functions + curated TSL/global reference, 60 task-oriented Manual guides) | Generated: 2026-08-25
Mesh, PerspectiveCamera, GLTFLoader, etc.; I find and read the matching chapter.ch042; I load that specific chapter.patterns.md (composition patterns) and cheatsheet.md (decision rules) first; they cover the recurring judgment calls this reference alone doesn't.When you ask about a class not covered in Core Patterns, I will read the relevant chapter file before answering — never guess an API surface (constructor args, prop names, method signatures) from memory when a chapter exists for it.
Scene graph composition: every visible/positionable thing is an Object3D (or subclass — Mesh, Light, Camera, Group...) added to a parent, ultimately rooted at a Scene. Transforms compose down the hierarchy — a child's world matrix depends on every ancestor's transform. Use object.add(child) / object.remove(child); read world-space values via getWorldPosition()/localToWorld(), not by assuming local === world.
Geometry + Material + Mesh: geometry (BufferGeometry subclass) defines shape, material defines shading, Mesh binds them for rendering. Both geometry and material are independently shareable across meshes — share to save memory, clone (.clone()) when independent mutation is needed.
The render loop: renderer.setAnimationLoop(callback) (preferred over manual requestAnimationFrame — it integrates with WebXR automatically) drives per-frame updates: advance animations/physics, then renderer.render(scene, camera).
Classic materials vs Node materials (TSL): MeshStandardMaterial and friends cover most PBR needs via fixed properties (color, roughness, metalness, maps). *NodeMaterial variants (MeshStandardNodeMaterial, etc.) accept custom TSL graphs on properties like colorNode/positionNode/normalNode when built-in properties aren't expressive enough — see ch797–799 for the TSL language itself.
Resource lifecycle: three.js does not garbage-collect GPU resources when a JS object becomes unreferenced. Call .dispose() on geometries, materials, and textures you're done with, or memory leaks accumulate in any app that creates/destroys objects at runtime.
Async asset loading: *Loader classes (GLTFLoader, TextureLoader, ...) load asynchronously — .load(url, onLoad, onProgress, onError) or .loadAsync(url). Design scene setup around a "not yet loaded" state rather than assuming synchronous availability.
Performance defaults worth knowing: frustum culling is on by default (Object3D.frustumCulled = true); prefer InstancedMesh/BatchedMesh over many individual meshes for repeated geometry; shadow maps are the single biggest lighting cost — enable them on the fewest lights possible; always call camera.updateProjectionMatrix() after changing camera frustum properties, since assignment alone doesn't recompute the projection matrix.
Two rendering backends, one API surface: WebGLRenderer (broadest compatibility) and WebGPURenderer (modern, required for TSL compute shaders, falls back to WebGL2) implement the same scene-graph/material model — most code is renderer-agnostic; TSL materials in particular compile to both GLSL and WGSL from one source.
See patterns.md for more composition patterns and cheatsheet.md for decision tables (camera/light/loader/renderer choice, performance thresholds, common failure "smells").
| # | Title | File |
|---|---|---|
| 1 | BatchedMesh | chapters/ch001-batchedmesh.md |
| 2 | Bone | chapters/ch002-bone.md |
| 3 | Group | chapters/ch003-group.md |
| 4 | InstancedMesh | chapters/ch004-instancedmesh.md |
| 5 | Line | chapters/ch005-line.md |
| 6 | LineLoop | chapters/ch006-lineloop.md |
| 7 | LineSegments | chapters/ch007-linesegments.md |
| 8 | LOD | chapters/ch008-lod.md |
| 9 | Mesh | chapters/ch009-mesh.md |
| 10 | Object3D | chapters/ch010-object3d.md |
| 11 | Points | chapters/ch011-points.md |
| 12 | Scene | chapters/ch012-scene.md |
| 13 | SkinnedMesh | chapters/ch013-skinnedmesh.md |
| 14 | Sprite | chapters/ch014-sprite.md |
| # | Title | File |
|---|---|---|
| 15 | ArrayCamera | chapters/ch015-arraycamera.md |
| 16 | Camera | chapters/ch016-camera.md |
| 17 | CubeCamera | chapters/ch017-cubecamera.md |
| 18 | OrthographicCamera | chapters/ch018-orthographiccamera.md |
| 19 | PerspectiveCamera | chapters/ch019-perspectivecamera.md |
| 20 | StereoCamera | chapters/ch020-stereocamera.md |
| # | Title | File |
|---|---|---|
| 284 | AnimationAction | chapters/ch284-animationaction.md |
| 285 | AnimationClip | chapters/ch285-animationclip.md |
| 286 | AnimationClipCreator | chapters/ch286-animationclipcreator.md |
| 287 | AnimationMixer | chapters/ch287-animationmixer.md |
| 288 | AnimationObjectGroup | chapters/ch288-animationobjectgroup.md |
| 289 | AnimationUtils | chapters/ch289-animationutils.md |
| 290 | BooleanKeyframeTrack | chapters/ch290-booleankeyframetrack.md |
| 291 | ColorKeyframeTrack | chapters/ch291-colorkeyframetrack.md |
| 292 | KeyframeTrack | chapters/ch292-keyframetrack.md |
| 293 | NumberKeyframeTrack | chapters/ch293-numberkeyframetrack.md |
| 294 | PropertyBinding | chapters/ch294-propertybinding.md |
| 295 | PropertyMixer | chapters/ch295-propertymixer.md |
| 296 | QuaternionKeyframeTrack | chapters/ch296-quaternionkeyframetrack.md |
| 297 | StringKeyframeTrack | chapters/ch297-stringkeyframetrack.md |
| 298 | VectorKeyframeTrack | chapters/ch298-vectorkeyframetrack.md |
| # | Title | File |
|---|---|---|
| 299 | Audio | chapters/ch299-audio.md |
| 300 | AudioAnalyser | chapters/ch300-audioanalyser.md |
| 301 | AudioContext | chapters/ch301-audiocontext.md |
| 302 | AudioListener | chapters/ch302-audiolistener.md |
| 303 | AudioLoader | chapters/ch303-audioloader.md |
| 304 | PositionalAudio | chapters/ch304-positionalaudio.md |
| 305 | PositionalAudioHelper | chapters/ch305-positionalaudiohelper.md |
| # | Title | File |
|---|---|---|
| 306 | ArcballControls | chapters/ch306-arcballcontrols.md |
| 307 | Controls | chapters/ch307-controls.md |
| 308 | DragControls | chapters/ch308-dragcontrols.md |
| 309 | FirstPersonControls | chapters/ch309-firstpersoncontrols.md |
| 310 | FlyControls | chapters/ch310-flycontrols.md |
| 311 | MapControls | chapters/ch311-mapcontrols.md |
| 312 | OrbitControls | chapters/ch312-orbitcontrols.md |
| 313 | PointerLockControls | chapters/ch313-pointerlockcontrols.md |
| 314 | TrackballControls | chapters/ch314-trackballcontrols.md |
| 315 | TransformControls | chapters/ch315-transformcontrols.md |
| # | Title | File |
|---|---|---|
| 316 | AnimationPathHelper | chapters/ch316-animationpathhelper.md |
| 317 | ArrowHelper | chapters/ch317-arrowhelper.md |
| 318 | AxesHelper | chapters/ch318-axeshelper.md |
| 319 | Box3Helper | chapters/ch319-box3helper.md |
| 320 | BoxHelper | chapters/ch320-boxhelper.md |
| 321 | CameraHelper | chapters/ch321-camerahelper.md |
| 322 | CCDIKHelper | chapters/ch322-ccdikhelper.md |
| 323 | CSMHelper | chapters/ch323-csmhelper.md |
| 324 | GridHelper | chapters/ch324-gridhelper.md |
| 325 | OctreeHelper | chapters/ch325-octreehelper.md |
| 326 | PlaneHelper | chapters/ch326-planehelper.md |
| 327 | PolarGridHelper | chapters/ch327-polargridhelper.md |
| 328 | RapierHelper | chapters/ch328-rapierhelper.md |
| 329 | SelectionHelper | chapters/ch329-selectionhelper.md |
| 330 | SkeletonHelper | chapters/ch330-skeletonhelper.md |
| 331 | TileShadowNodeHelper | chapters/ch331-tileshadownodehelper.md |
| 332 | VertexNormalsHelper | chapters/ch332-vertexnormalshelper.md |
| 333 | VertexTangentsHelper | chapters/ch333-vertextangentshelper.md |
| 334 | ViewHelper | chapters/ch334-viewhelper.md |
| # | Title | File |
|---|---|---|
| 795 | Global Constants Reference | chapters/ch795-global-constants.md |
| 796 | Global Utility Functions | chapters/ch796-global-utility-functions.md |
| 797 | TSL Language Basics | chapters/ch797-tsl-language-basics.md |
| 798 | TSL Built-in Inputs & Attributes | chapters/ch798-tsl-builtin-inputs.md |
| 799 | TSL Utility & Post-processing Functions | chapters/ch799-tsl-utility-functions.md |
Task-oriented lessons from the official Three.js Manual (as distinct from the class-by-class API reference above) — read these when you need to know how to accomplish something, not just what a class's API surface is.
This skill covers the Three.js @three.js documentation as fetched from the official repository (dev branch, fetched 2026-08-25) — Core API, Addons (examples/jsm), and the TSL shading language. Chapters are synthesized/restructured reference summaries, not verbatim copies of the source docs; always verify exact signatures against the official docs or TypeScript types for anything version-sensitive. Three.js's API surface changes across releases — if working against a pinned older/newer version, cross-check before relying on a chapter's exact signatures. The TSL chapters (797-799) and the Global reference chapters (795-796) are curated subsets of a much larger function library (600+ TSL functions, 1000+ global constants) — not exhaustive; use editor autocomplete on three/tsl / three to discover what isn't covered here.