Skip to content

Conversation

@sunag
Copy link
Collaborator

@sunag sunag commented Aug 3, 2025

Related issue: #30849

Description

Improves checks to prevent the renderer from freezing if the code has issues.
TSL normally replaces the faulty node with an "identity" value, regardless of the expected type.

Returning null value from a Fn()

material.colorNode = Fn( () => { } )();

Now
image

Old
image

Return snippet verification for all nodes

material.colorNode = vec3( Fn( () => { } )() );

Now
image

Old
image

@sunag sunag mentioned this pull request Aug 1, 2025
12 tasks
@github-actions
Copy link

github-actions bot commented Aug 3, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 338.62
79.03
338.62
79.03
+0 B
+0 B
WebGPU 566.43
156.57
566.96
156.76
+530 B
+189 B
WebGPU Nodes 565.03
156.32
565.56
156.51
+530 B
+189 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 470.05
113.73
470.05
113.73
+0 B
+0 B
WebGPU 637.91
172.58
638.44
172.77
+530 B
+189 B
WebGPU Nodes 592.56
161.85
593.09
162.03
+530 B
+184 B

@sunag sunag added this to the r180 milestone Aug 3, 2025
@sunag sunag marked this pull request as ready for review August 4, 2025 00:41
@sunag sunag merged commit f9a1449 into mrdoob:dev Aug 4, 2025
9 checks passed
@sunag sunag deleted the dev-tsl-warnings branch August 4, 2025 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant