Skip to content

Commit b206d62

Browse files
authored
TSL: Use RGBA for batching color. (#2236)
* Update three.js * Add jsdoc * Update patch and delete jsdoc * Update declarations * Add examples * Update patch and delete examples
1 parent 2f8afad commit b206d62

4 files changed

Lines changed: 10 additions & 15 deletions

File tree

examples-testing/changes.patch

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,15 +1246,10 @@ index c19eb94a6..7900c0e18 100644
12461246
ctx.fillRect(0, 0, 64, 64);
12471247
ctx.fillStyle = '#FFD500';
12481248
diff --git a/examples-testing/examples/misc_exporter_gltf_normals.ts b/examples-testing/examples/misc_exporter_gltf_normals.ts
1249-
index 6ca397191..4cbc0c74b 100644
1249+
index c2981aa33..4cbc0c74b 100644
12501250
--- a/examples-testing/examples/misc_exporter_gltf_normals.ts
12511251
+++ b/examples-testing/examples/misc_exporter_gltf_normals.ts
1252-
@@ -1,14 +1,15 @@
1253-
-import * as THREE from '../build/three.module.js';
1254-
+import * as THREE from 'three';
1255-
1256-
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
1257-
import { GLTFExporter } from 'three/addons/exporters/GLTFExporter.js';
1252+
@@ -5,10 +5,11 @@ import { GLTFExporter } from 'three/addons/exporters/GLTFExporter.js';
12581253

12591254
//
12601255

jsdoc-testing/changes.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10894,7 +10894,7 @@ index e8ddddc6e..9a57cd2c3 100644
1089410894
}
1089510895
-import { Interpolant } from '../Interpolant.js';
1089610896
diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/Batch.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/Batch.d.ts
10897-
index 268433191..59c1bf68a 100644
10897+
index 4e35027cf..fd38c824e 100644
1089810898
--- a/jsdoc-testing/jsdoc/src/nodes/accessors/Batch.d.ts
1089910899
+++ b/jsdoc-testing/jsdoc/src/nodes/accessors/Batch.d.ts
1090010900
@@ -1,9 +1,12 @@
@@ -10904,14 +10904,14 @@ index 268433191..59c1bf68a 100644
1090410904
/**
1090510905
* TSL object representing a varying property for the batching color vector.
1090610906
*
10907-
* @type {VaryingNode<vec3>}
10907+
* @type {VaryingNode<vec4>}
1090810908
*/
10909-
-export const batchColor: VaryingNode<any>;
10910-
+export const batchColor: VaryingNode<'vec3'>;
10909+
-export const batchColor: VaryingNode<vec4>;
10910+
+export const batchColor: VaryingNode<'vec4'>;
1091110911
/**
1091210912
* TSL function representing the vertex shader batching setup.
1091310913
* Applies the batch transformation matrix to positionLocal, normalLocal, and tangentLocal.
10914-
@@ -13,4 +16,4 @@ export const batchColor: VaryingNode<any>;
10914+
@@ -13,4 +16,4 @@ export const batchColor: VaryingNode<vec4>;
1091510915
* @function
1091610916
* @param {BatchedMesh} batchMesh - The batched mesh.
1091710917
*/

types/three/src/nodes/accessors/Batch.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import VaryingNode from "../core/VaryingNode.js";
44
/**
55
* TSL object representing a varying property for the batching color vector.
66
*
7-
* @type {VaryingNode<vec3>}
7+
* @type {VaryingNode<vec4>}
88
*/
9-
export const batchColor: VaryingNode<"vec3">;
9+
export const batchColor: VaryingNode<"vec4">;
1010
/**
1111
* TSL function representing the vertex shader batching setup.
1212
* Applies the batch transformation matrix to positionLocal, normalLocal, and tangentLocal.

0 commit comments

Comments
 (0)