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

Update WGSLNodeBuilder.js #30011

Closed
wants to merge 1 commit into from
Closed

Conversation

Spiri0
Copy link
Contributor

@Spiri0 Spiri0 commented Dec 2, 2024

Arrays are not currently taken into account by the wgslTypeLib.
However, with the struct extension #29908, arrays will also become important as a type.

console.log( wgslTypeLib.array('vec4', 6) );

return

array<vec4<f32>, 6>

Arrays are not currently taken into account by the wgslTypeLib. However, with the struct extension mrdoob#29908, arrays will also become important as a type.
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.8
134.59
+224 B
+107 B
WebGPU Nodes 484.04
134.38
484.26
134.49
+224 B
+108 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.59
149.89
+224 B
+119 B
WebGPU Nodes 509.24
139.48
509.47
139.6
+224 B
+120 B

@Spiri0
Copy link
Contributor Author

Spiri0 commented Dec 14, 2024

uniformArray are a good alternative. They serve the purpose quite well so nothing extra is necessary.

@Spiri0 Spiri0 closed this Dec 14, 2024
@Spiri0 Spiri0 deleted the wgslTypeLib-extension branch December 14, 2024 13:06
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