Skip to content

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Aug 1, 2025

Related issue: #30849

Description

It's very much like using .colorNode = Fn( ... )(), but I often see users — myself included — forget to call it, ending up with a low-level message that doesn't say much. This PR improves the message, guiding the user to invoke the declared function.

material.colorNode = Fn( () => {

	return float();

} ); // missing () in the final

New message

image

Old message

image

@sunag sunag added this to the r180 milestone Aug 1, 2025
@sunag sunag mentioned this pull request Aug 1, 2025
12 tasks
Copy link

github-actions bot commented Aug 1, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 338.84
79.07
338.84
79.07
+0 B
+0 B
WebGPU 566.16
156.5
566.64
156.62
+481 B
+115 B
WebGPU Nodes 564.77
156.26
565.25
156.37
+481 B
+112 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 470.26
113.77
470.26
113.77
+0 B
+0 B
WebGPU 637.36
172.49
637.84
172.63
+481 B
+131 B
WebGPU Nodes 592.01
161.73
592.49
161.85
+481 B
+120 B

@sunag sunag marked this pull request as ready for review August 2, 2025 12:34
@sunag sunag merged commit c50e257 into mrdoob:dev Aug 2, 2025
9 checks passed
@sunag sunag deleted the dev-improve-fn-warnings branch August 2, 2025 12:35
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