Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node: Document more modules. #30012

Merged
merged 2 commits into from
Dec 2, 2024
Merged

Node: Document more modules. #30012

merged 2 commits into from
Dec 2, 2024

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Dec 2, 2024

Related issue: #29984

Description

More API documentation.

@@ -937,22 +1111,25 @@ class NodeBuilder {

}

getStructTypeFromNode( node, shaderStage = this.shaderStage ) {
getStructTypeFromNode( node, types, shaderStage = this.shaderStage ) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sunag I have slightly refactored getStructTypeFromNode() so it is more similar to getBufferAttributeFromNode() or getUniformFromNode().

Copy link

github-actions bot commented Dec 2, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 339.11
78.98
339.11
78.98
+0 B
+0 B
WebGPU 484.57
134.48
484.6
134.48
+24 B
-3 B
WebGPU Nodes 484.04
134.38
484.06
134.38
+24 B
-2 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 464.62
111.98
464.62
111.98
+0 B
+0 B
WebGPU 553.36
149.77
553.55
149.82
+185 B
+48 B
WebGPU Nodes 509.24
139.48
509.43
139.53
+185 B
+56 B

*
* @param {String} type - The input type.
* @param {String} name - The input name.
* @param {Number?} [count=null] - TODO (only relevant for GLSL).
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sunag Not sure about the purpose of count.

It also seems this part of the code throws currently a runtime error in GLSLNodeFunction. Try webgpu_materials with a WebGL backend.

Uncaught TypeError: undefined has no properties
parse$1 https://threejs.org/build/three.webgpu.js:27563
GLSLNodeFunction https://threejs.org/build/three.webgpu.js:27607
parseFunction https://threejs.org/build/three.webgpu.js:27655

@Mugen87 Mugen87 merged commit b2320be into mrdoob:dev Dec 2, 2024
12 checks passed
@Mugen87 Mugen87 added this to the r172 milestone Dec 2, 2024
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