Breaking Changes
| Area | Change |
|---|---|
| WebGLRenderer |
Breaking
renderer.outputEncoding removed. Use
renderer.outputColorSpace instead (THREE.SRGBColorSpace
or THREE.LinearSRGBColorSpace)
|
| Textures |
Breaking
texture.encoding removed. Use
texture.colorSpace (THREE.SRGBColorSpace
for sRGB images, THREE.NoColorSpace for normal
maps/data)
|
| CubeCamera |
Breaking Constructor
parameter order changed. Second arg is now
renderTarget instead of resolution. Use
new THREE.WebGLCubeRenderTarget(size)
explicitly
|
| Points / Lines |
Breaking
PointsMaterial.sizeAttenuation default changed
— verify existing point clouds render correctly
|
| PMREMGenerator |
Breaking
fromEquirectangular() now returns the render
target directly rather than an object. Update:
const envMap =
pmrem.fromEquirectangular(hdrTexture).texture
→
const envMap =
pmrem.fromEquirectangular(hdrTexture)
|
New Features
| Feature | Description |
|---|---|
| NodeMaterial system |
New Composable
node-based material system for WebGPU and WebGL backends.
MeshStandardNodeMaterial,
MeshPhysicalNodeMaterial, etc.
|
| BatchedMesh | New Like InstancedMesh but allows different geometries in a single draw call. GPU-driven with frustum culling support |
| WebGPURenderer |
New Preview WebGPU
renderer in
three/examples/jsm/renderers/webgpu/. Drop-in
replacement with same API as WebGLRenderer
|
| TSL (Three Shading Language) | New JavaScript-embedded shading language for writing portable shaders that compile to GLSL or WGSL |
| ColorManagement |
New
THREE.ColorManagement.enabled = true (default).
Replaces manual gamma encoding. All color inputs are assumed
sRGB
|
Deprecations
| Deprecated | Use Instead |
|---|---|
| THREE.sRGBEncoding | THREE.SRGBColorSpace |
| THREE.LinearEncoding | THREE.LinearSRGBColorSpace |
| THREE.RGBEEncoding | THREE.NoColorSpace (data texture) |
| renderer.outputEncoding | renderer.outputColorSpace |
| texture.encoding | texture.colorSpace |
| Color.convertSRGBToLinear() |
ColorManagement.toWorkingColorSpace(color,
SRGBColorSpace)
|
| Geometry (old, V1) |
Fully removed — only BufferGeometry remains
|
WebGPU Backend Preview
r160 ships a nearly-complete WebGPU renderer under
three/addons/. It shares the same scene graph but uses
WGSL shaders compiled via TSL.
// Using the WebGPU renderer (drop-in API)
import WebGPURenderer from 'three/addons/renderers/common/Renderer.js';
const renderer = new WebGPURenderer({ antialias: true });
await renderer.init();
document.body.appendChild(renderer.domElement);
The WebGPU renderer requires Chrome 113+ or Firefox Nightly with
WebGPU enabled. Safari support is partial as of r160. For
production, continue using
WebGLRenderer.
Migration from r158/r159
The most common migration tasks in r160 are the color space API rename:
// BEFORE (r158) renderer.outputEncoding = THREE.sRGBEncoding; texture.encoding = THREE.sRGBEncoding; normalMap.encoding = THREE.LinearEncoding; // AFTER (r160) renderer.outputColorSpace = THREE.SRGBColorSpace; texture.colorSpace = THREE.SRGBColorSpace; normalMap.colorSpace = THREE.NoColorSpace; // data textures = no color space
-
Search your codebase for
Encoding— rename all occurrences to equivalentColorSpacevalues -
Check
PMREMGeneratorusage — the return value changed -
ColorManagement.enabledistrueby default from r152+. If you see incorrect lighting, check you're not double-encoding colors -
Run the official migration script:
npx three-migrate(handles most renames automatically)