Skip to content

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Apr 22, 2025

Closes #30186

Description

Change the callback signature from debug to callback( builder, code ), thus giving the developer greater options.

material.outputNode = output.debug( ( ( builder ) => {

	console.log( builder.uniforms );
	// console.log( builder.flow ); // for the current flow of code

} ) );

@sunag sunag added this to the r176 milestone Apr 22, 2025
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.33
78.33
336.33
78.33
+0 B
+0 B
WebGPU 547.3
151.72
547.3
151.72
+2 B
+1 B
WebGPU Nodes 546.65
151.56
546.65
151.56
+2 B
+1 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 465.78
112.28
465.78
112.28
+0 B
+0 B
WebGPU 622.15
168.3
622.15
168.3
+2 B
+3 B
WebGPU Nodes 577.02
157.57
577.03
157.57
+2 B
+3 B

@sunag sunag marked this pull request as ready for review April 22, 2025 08:55
@sunag sunag merged commit 9147649 into mrdoob:dev Apr 22, 2025
12 checks passed
@sunag sunag deleted the dev-improve-debug branch April 22, 2025 08:56
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
…ion signature (mrdoob#30976)

* improve debug callback

* Update DebugNode.js

* Update DebugNode.js

* Update DebugNode.js

* Update DebugNode.js
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
…ion signature (mrdoob#30976)

* improve debug callback

* Update DebugNode.js

* Update DebugNode.js

* Update DebugNode.js

* Update DebugNode.js
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.

Request Uniforms/Inputs from a NodeMaterial
1 participant