ToolsMiddleweight
Three.js
The standard toolkit for 3D on a web page.
The most common toolkit for putting 3D on a web page. You describe objects, lights and a camera, and it draws them in the browser. Most of the 3D demos on X are built with it, so when you ask for “3D on a website” this is usually what you get.
- Breaks when
- bundle bloat from importing all of threeCDN import maps break on version bumps
- Also called
- threejs, THREE, three
Prompts
Product hero, one object
Build a single-page Three.js scene: one glTF (/model.glb) centered, PerspectiveCamera fov 32 at (0, 0.6, 4.5) looking at the origin. Lighting: RoomEnvironment for IBL plus one DirectionalLight at (2, 4, 3), intensity 1.6, casting a 2048 shadow map onto an invisible ShadowMaterial floor (opacity 0.22). ACESFilmic tone mapping, exposure 0.95, sRGB output. The pointer rotates the object ±12° with damping 0.08; no OrbitControls. Idle: a 14 s slow yaw. Handle resize, cap DPR at 2, dispose everything on unmount. Vanilla ES modules via an import map, no bundler.
Editorial background, no asset files
Three.js scene with zero external assets: 240 thin TorusGeometry rings (radius 0.5–3.2, tube 0.006) sharing one MeshBasicMaterial in the ink color at opacity 0.35, placed on a Fibonacci sphere and rotating as one group at 0.02 rad/s. OrthographicCamera so it reads as a diagram, not a product shot. Fog from 6 to 14 units in the page background color so far rings dissolve. Pause the loop when the section is off-screen (IntersectionObserver) and when the tab is hidden.
Scene behind a long article
Mount a fixed full-viewport Three.js canvas behind a normal HTML article with three sections. When a section becomes active (IntersectionObserver, threshold 0.5), tween the camera to that section’s stored position and target over 1.1 s (GSAP power3.inOut) and cross-fade the section’s group opacity. The camera depends only on which section is active, never on raw scroll position, so it is deterministic at any scroll speed. Keep total draw calls under 40 and log renderer.info once.
Related
Resources · 9
- three.js example: GPGPU flocking birdsCanonical FBO boids; the reference for "birds on the GPU".mrdoobsite · code · demoSep 1, 2026
- Spark: 3DGS renderer for three.jsSplats as a THREE object; mixes with normal meshes.sparkjsdevGitHub · code · demoAug 19, 2026
- Bruno Simon portfolioDrive a car through a baked scene; the reference 3D portfolio.bruno_simonsite · demoAug 15, 2026
- react-three-fiberpmndrsGitHub · code · demoAug 10, 2026
- three.js example: ASCII effectDOM-based; fine for one object, not a full scene.mrdoobsite · code · demoJul 28, 2026
- three.quarks particle systemAlchemist0823GitHub · code · demoMay 30, 2026
- glTF Viewerdonrmccurdysite · code · demoMay 25, 2026
- three.js manual: scene graphmrdoobsite · code · demoApr 28, 2026
- @akellaProfile, not a post. Weekly shader livestream breakdowns.akellaXApr 3, 2026