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. #30041

Merged
merged 2 commits into from
Dec 5, 2024
Merged

Node: Document more modules. #30041

merged 2 commits into from
Dec 5, 2024

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Dec 5, 2024

Related issue: #29984

Description

Adding more docs.

Copy link

github-actions bot commented Dec 5, 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.86
134.6
484.85
134.59
-9 B
-6 B
WebGPU Nodes 484.32
134.5
484.31
134.5
-9 B
-7 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 465
112.04
465
112.04
+0 B
+0 B
WebGPU 554.24
150.04
554.24
150.04
+0 B
+0 B
WebGPU Nodes 510.12
139.75
510.12
139.75
+0 B
+0 B

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Dec 5, 2024

While writing the JSDoc there were multiple occasions where I had to document a property or parameter of a node type. The issue is in most cases I have to use the Node type because of the generic character of the node system. However, it would be more precise to additionally mentioned what data type is expected by the module.

For example a uvNode is currently documented as Node but I wonder if something like Node<vec2> would be more precise.

@sunag
Copy link
Collaborator

sunag commented Dec 5, 2024

For example a uvNode is currently documented as Node but I wonder if something like Node would be more precise.

Sounds good to me 👍 This should help especially in TSL

@sunag sunag added this to the r172 milestone Dec 5, 2024
@Mugen87
Copy link
Collaborator Author

Mugen87 commented Dec 5, 2024

Okay, I'll revisit this aspect with a separate PR. Adding the node type less work than writing the JSDoc in the first place^^.

@Mugen87 Mugen87 merged commit 16cb40e into mrdoob:dev Dec 5, 2024
12 checks passed
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.

2 participants