From d14d3ec07beb851fc17a74487e9c58512e48f15f Mon Sep 17 00:00:00 2001 From: Garrett Johnson Date: Tue, 24 Feb 2026 22:03:09 +0900 Subject: [PATCH 1/4] InstancedMesh: add consistent return values to functions (#33059) --- src/objects/InstancedMesh.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/objects/InstancedMesh.js b/src/objects/InstancedMesh.js index b2dbb5745fa4a5..fcad3777288d98 100644 --- a/src/objects/InstancedMesh.js +++ b/src/objects/InstancedMesh.js @@ -213,10 +213,11 @@ class InstancedMesh extends Mesh { * * @param {number} index - The instance index. * @param {Color} color - The target object that is used to store the method's result. + * @return {Color} A reference to the target color. */ getColorAt( index, color ) { - color.fromArray( this.instanceColor.array, index * 3 ); + return color.fromArray( this.instanceColor.array, index * 3 ); } @@ -225,10 +226,11 @@ class InstancedMesh extends Mesh { * * @param {number} index - The instance index. * @param {Matrix4} matrix - The target object that is used to store the method's result. + * @return {Matrix4} A reference to the target matrix. */ getMatrixAt( index, matrix ) { - matrix.fromArray( this.instanceMatrix.array, index * 16 ); + return matrix.fromArray( this.instanceMatrix.array, index * 16 ); } @@ -314,6 +316,7 @@ class InstancedMesh extends Mesh { * * @param {number} index - The instance index. * @param {Color} color - The instance color. + * @return {InstancedMesh} A reference to this instanced mesh. */ setColorAt( index, color ) { @@ -324,6 +327,7 @@ class InstancedMesh extends Mesh { } color.toArray( this.instanceColor.array, index * 3 ); + return this; } @@ -333,10 +337,12 @@ class InstancedMesh extends Mesh { * * @param {number} index - The instance index. * @param {Matrix4} matrix - The local transformation. + * @return {InstancedMesh} A reference to this instanced mesh. */ setMatrixAt( index, matrix ) { matrix.toArray( this.instanceMatrix.array, index * 16 ); + return this; } @@ -347,6 +353,7 @@ class InstancedMesh extends Mesh { * @param {number} index - The instance index. * @param {Mesh} object - A mesh which `morphTargetInfluences` property containing the morph target weights * of a single instance. + * @return {InstancedMesh} A reference to this instanced mesh. */ setMorphAt( index, object ) { @@ -377,6 +384,7 @@ class InstancedMesh extends Mesh { array[ dataIndex ] = morphBaseInfluence; array.set( objectInfluences, dataIndex + 1 ); + return this; } From 2b5ba4f99fa5a570514c070b218da1e815b3a7f8 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Tue, 24 Feb 2026 08:05:51 -0500 Subject: [PATCH 2/4] Examples: Fix colors in webgpu_custom_fog (#33057) --- examples/webgpu_custom_fog.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/webgpu_custom_fog.html b/examples/webgpu_custom_fog.html index 9ef8604b10d00a..944a612f971006 100644 --- a/examples/webgpu_custom_fog.html +++ b/examples/webgpu_custom_fog.html @@ -53,8 +53,11 @@ // custom fog - const skyColor = color( 0xf0f5f5 ); - const groundColor = color( 0xd0dee7 ); + const skyColorValue = 0xf0f5f5; + const groundColorValue = 0xd0dee7; + + const skyColor = color( skyColorValue ); + const groundColor = color( groundColorValue ); const fogNoiseDistance = positionView.z.negate().smoothstep( 0, camera.far - 300 ); @@ -112,7 +115,7 @@ // lights - scene.add( new THREE.HemisphereLight( skyColor.value, groundColor.value, 0.5 ) ); + scene.add( new THREE.HemisphereLight( skyColorValue, groundColorValue, 0.5 ) ); // geometry From 2e3cf39fbba5c840fda3f571083b1f9320f1533a Mon Sep 17 00:00:00 2001 From: James Wheare Date: Tue, 24 Feb 2026 13:07:18 +0000 Subject: [PATCH 3/4] TSL: Fix billboarding examples in TSL.md (#33056) --- docs/TSL.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/TSL.md b/docs/TSL.md index 26a4f43cf18d40..e1dd74fd10e165 100644 --- a/docs/TSL.md +++ b/docs/TSL.md @@ -1483,11 +1483,11 @@ Example: ```js import { billboarding } from 'three/tsl'; -// Full billboarding (like particles) - faces camera in all directions +// Default: Horizontal only (like trees) - rotates around Y axis only material.vertexNode = billboarding(); -// Horizontal only (like trees) - rotates around Y axis only -material.vertexNode = billboarding( { horizontal: true, vertical: false } ); +// Full billboarding (like particles) - faces camera in all directions +material.vertexNode = billboarding( { horizontal: true, vertical: true } ); ``` ## NodeMaterial From e61ab90bd7b03dd9956d170476966ca7d9f7af46 Mon Sep 17 00:00:00 2001 From: Michael Herzog Date: Tue, 24 Feb 2026 14:07:38 +0100 Subject: [PATCH 4/4] Examples: Fix floor threshold in `games_fps`. (#33053) --- examples/games_fps.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/games_fps.html b/examples/games_fps.html index 6d00986d2c1cf8..9cfa166c94b2dc 100644 --- a/examples/games_fps.html +++ b/examples/games_fps.html @@ -203,7 +203,9 @@ if ( result ) { - playerOnFloor = result.normal.y > 0; + // determine if the surface we bumped into is something we can stand on + + playerOnFloor = result.normal.y >= 0.15; // allow slopes up to ~81° but ignore sheer vertical walls if ( ! playerOnFloor ) {