株式会社オブライト
Web Development2026-04-24

Three.js Complete Guide 2026 — Where Web 3D Stands After WebGPU, TSL, and React Three Fiber

Three.js is the dominant open-source library for 3D on the web. In 2026, with Apple Safari shipping WebGPU support, the Three.js WebGPU renderer reached production maturity. This guide covers what Three.js can do today, TSL (Three Shading Language), the React Three Fiber ecosystem, real-world business use cases, and the latest gotchas — from a practitioner's perspective.


What is Three.js — the de facto standard for 3D on the web

Three.js (https://threejs.org) is a JavaScript library for rendering 3D in web browsers. Released by Ricardo Cabello (mrdoob) in 2010, it has become the de facto standard for Web 3D — used in e-commerce product viewers, real-estate VR walkthroughs, education, data visualization, games, art, and metaverse-style apps. It expresses 3D scenes in dramatically less code than raw WebGL, and a vast ecosystem of examples and helpers makes implementation efficient.

What's new in 2026

Key shifts as of Q2 2026: - WebGPU is universal: Apple shipped WebGPU support in Safari 26 in September 2025, eliminating the last major browser holdout. - The WebGPU renderer just works: Since r171, WebGPU integration no longer requires bundler tweaks or polyfills, and silently falls back to WebGL 2 on older browsers. - Compute shaders for GPU parallelism: collision detection, large particle systems, lighting calculations — million-unit scale becomes realistic. - r184 (March 2026) memory cleanup: per-frame allocations were eliminated, helping complex scenes hold steady frame rates. See references at the end.

What WebGPU support changes

WebGPU is the successor to WebGL, bringing modern graphics-API capabilities (Vulkan / Metal / Direct3D 12) to the web. From a Three.js perspective: - Compute shaders: GPU-side parallelism for physics, fluids, particles, collision - Lower CPU overhead: draw-call setup is much cheaper than in WebGL - Modern shader expression: WGSL (WebGPU Shading Language) as the standard In business terms: heavier scenes run smoothly on the same hardware, with fewer hitches. Note that as a newer renderer, edge-case bugs and performance regressions occasionally appear in specific releases — verify against release notes and run perf measurements before going to production.

TSL (Three Shading Language) — escape from GLSL/WGSL dual maintenance

Three.js has matured TSL — the Three Shading Language — which lets you author shaders as JavaScript function compositions. TSL is a node-based shader abstraction: a single TSL shader compiles internally to both WGSL (for WebGPU) and GLSL (for WebGL), eliminating the duplicated work of maintaining shaders for both renderers. Visual node editors like "TSL Graph" are also taking shape, opening shader authoring to designers and non-engineers.

React Three Fiber (R3F) and the pmndrs ecosystem

In React projects, the de facto choice is React Three Fiber (R3F), maintained by the Poimandres (pmndrs) community. It lets you express the Three.js scene graph as a declarative React component tree. Common neighboring libraries: - drei: helpers for camera, lighting, loaders, and more - react-three-rapier: R3F bindings for the Rapier physics engine - react-three-postprocessing: bloom, DOF, SSAO, etc. - leva: GUI knobs for scene parameters Full WebGPU integration in R3F is still maturing as of Q2 2026, but a working pattern is to pass the WebGPU renderer through the `gl` prop (see the official README and the linked field-guide post). The combination plays well with modern React stacks (Next.js, Remix).

Loading diagram...

Where Three.js earns its keep in business

Five practical sweet spots:

AreaExamplesWhy it pays off
E-commerce / product viewersFurniture, cars, apparel 360° viewers, color/variant switchingLower returns, longer dwell time
Real estate / constructionVR walkthroughs, CAD model display, 3D progress sharingPre-qualify visits, remote agreement
Education / trainingManipulable 3D of machinery, anatomy, moleculesStronger retention
Data visualizationLarge-scale network graphs, geospatial, IoT sensor mapsReveals relationships invisible in 2D
Brand / experienceScroll-driven 3D narratives, product launch sitesMemorable promotion

At Oflight, we increasingly see e-commerce and real-estate clients ask for 3D viewers built on Three.js / R3F.

Performance practices

Common Web 3D performance traps and the antidotes: - Decide target devices first: PC-only? Mobile? Low-end Android? Design diverges sharply. - Measure draw calls and triangle count: aim for under ~100 draw calls and at most a few hundred thousand vertices. Reduce draw calls with InstancedMesh / BatchedMesh. - Compress textures with KTX2 / Basis: drastic savings on bandwidth and VRAM. - Profile frame time: r3f-perf and stats.js make hot spots visible. - Watch thermal throttling on mobile: even at 60fps, sustained heat can drop frames over time.

Getting started — minimum setup

With plain Three.js: 1. `npm install three` 2. Add a `<canvas>` and instantiate `THREE.WebGPURenderer` (or `THREE.WebGLRenderer`) 3. Build a scene: scene, camera, geometry, material, lights 4. Run an animation loop that calls `renderer.render(scene, camera)` In React, R3F is dramatically more ergonomic: 1. `npm install three @react-three/fiber @react-three/drei` 2. Inside `<Canvas>`, declare `<mesh>`, `<directionalLight>`, etc., as components 3. Drop in helpers like drei's `<OrbitControls>` to enable camera controls instantly The official examples (threejs.org) are abundant — the most efficient learning path is finding a close-enough sample and adapting it.

How Oflight uses it

Oflight increasingly adopts Three.js / R3F across web development and internal systems work. WebGPU and TSL maturity has made 3D scenes that previously demanded native apps now run at acceptable frame rates in plain browsers. Within our standard delivery — Web Development, Software Development, and AI Consulting — when 3D visualization meaningfully improves the workflow we propose Three.js. Implementation typically goes through our DocDD (Document Driven Development) workflow, with Claude Code-style AI pair programming for fast iteration.

FAQ

Q1: Is sticking with WebGL fine? A: Yes — there's no urgency to migrate stable WebGL projects. For new builds, default to WebGPU with WebGL auto-fallback. Q2: Three.js vs. Babylon.js vs. PlayCanvas? A: Three.js is a library (compose your own stack), Babylon.js is a framework (batteries included), PlayCanvas is an editor-driven platform. Three.js has the largest ecosystem. Q3: Does it work on mobile? A: Yes, but GPU variance is large. Plan for measured frame budgets, polygon reduction, and LOD (level of detail) on the targeted devices. Q4: Is TSL worth learning? A: Yes. Avoiding double maintenance of GLSL and WGSL is significant, and the node workflow scales nicely to designer collaboration. Q5: R3F or plain Three.js? A: For React projects, R3F. For non-React (Vue, Svelte, vanilla JS), use Three.js directly. R3F has a learning curve but pays off in mid-to-large component-based projects. Q6: Any AI integrations? A: Text-prompt-to-scene generation, AI-assisted TSL shader writing, automated asset placement — Three.js pairs cleanly with modern AI coding workflows.

References

Feel free to contact us

Contact Us