Skip to content

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Sep 23, 2025

Related issue: #31869, #31919

Description

The PR introduces the API for individual node inspection and a viewer. The operation is quite simple, the developer just need to use the function node.toInspector(). There are two additional parameters in this function, one to add a custom name and the other to create a custom node visualization .toInspector( node, callback ).

const scenePass = pass( scene, camera ).toInspector();

const scenePassDepth = scenePass.getTextureNode( 'depth' ).toInspector( 'Depth', () => {

	// return linear-depth for the inspector
	return scenePass.getLinearDepthNode();

} );

Live

screencapture-localhost-three-js-examples-webgpu-postprocessing-ssgi-html-2025-09-22-19_09_16

Summary

Copy link

github-actions bot commented Sep 23, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 338.24
79.14
338.24
79.14
+0 B
+0 B
WebGPU 587.02
162.04
587.96
162.29
+931 B
+250 B
WebGPU Nodes 585.63
161.79
586.56
162.05
+931 B
+253 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 469.7
113.74
469.7
113.74
+0 B
+0 B
WebGPU 656.48
177.54
657.38
177.78
+907 B
+235 B
WebGPU Nodes 610.47
166.71
611.38
166.96
+907 B
+252 B

@RenaudRohlinger
Copy link
Collaborator

Not sure why but the inspector never starts in dev and in this branch on my local or any rawcdn.githack links:
image

Or in some case it will start and inspects for a few frames but then stops after a few seconds. Here an example running for a solid minute:
image
44fps was a value from 30sec+ ago and my macbook pro for sure run the example at 120fps+:
image

@Makio64
Copy link
Contributor

Makio64 commented Sep 23, 2025

I just tested it and i dont have the fps / graph stats or anything in performance, the gui controller & nodes works.

macbook pro max M3

Screenshot 2025-09-24 at 01 11 36

@GGAlanSmithee
Copy link
Contributor

sorry if this comment is totally out of place, but it would be nice to be able to see the FPS at all times - ie. not hide the small top right reporter even when the inspector is opened

@sunag
Copy link
Collaborator Author

sunag commented Sep 24, 2025

@RenaudRohlinger , @Makio64
I updated the links with the latest commits, could you detail your experience again?

but it would be nice to be able to see the FPS at all times - ie. not hide the small top right reporter even when the inspector is opened

I didn't do this because it seemed redundant since it's in performance as well, but now that there are new tabs it might make sense.

@Makio64
Copy link
Contributor

Makio64 commented Sep 24, 2025

@sunag still no fps showing / nothing in performance tabs.

@sunag
Copy link
Collaborator Author

sunag commented Sep 24, 2025

Sorry, try these new links, I think git didn't update :|

@Makio64
Copy link
Contributor

Makio64 commented Sep 24, 2025

it works, 120fps and thats killing it ! Currently working for the weather meteo with lot of rendering for effects.. it will help a tons to debug & improve !

@RenaudRohlinger
Copy link
Collaborator

All good now!

@sunag sunag marked this pull request as ready for review September 25, 2025 17:02
@sunag sunag added this to the r181 milestone Sep 25, 2025
@sunag sunag merged commit 4832815 into mrdoob:dev Sep 26, 2025
9 checks passed
@Mugen87
Copy link
Collaborator

Mugen87 commented Sep 26, 2025

How am I supposed to close the inspector on mobile devices?

image

It seems the - button is missing in the mobile view.

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.

5 participants