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

Merged
merged 1 commit into from
Dec 8, 2024
Merged

Node: Document more modules. #30067

merged 1 commit into from
Dec 8, 2024

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Dec 8, 2024

Related issue: #29984

Description

More documentation.

@@ -65,11 +106,11 @@ class RangeNode extends Node {
max.setScalar( 0 );

if ( minLength === 1 ) min.setScalar( minValue );
else if ( minValue.isColor ) min.set( minValue.r, minValue.g, minValue.b );
else if ( minValue.isColor ) min.set( minValue.r, minValue.g, minValue.b, 1 );
Copy link
Collaborator Author

@Mugen87 Mugen87 Dec 8, 2024

Choose a reason for hiding this comment

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

@sunag This is a minor fix to prevent NaN values in the attribute. Vector4.set() should always be used with four arguments otherwise properties end up undefined and then produce garbage values in subsequent computations.

Since the code assumes a four-component color value, 1 is used so alpha gets 1.

Copy link

github-actions bot commented Dec 8, 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 486.01
134.92
486.01
134.92
-2 B
-1 B
WebGPU Nodes 485.48
134.83
485.48
134.82
-2 B
-2 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 555.41
150.39
555.41
150.39
+0 B
+0 B
WebGPU Nodes 511.26
140.1
511.26
140.1
+0 B
+0 B

@sunag sunag added this to the r172 milestone Dec 8, 2024
@sunag sunag merged commit 19bdc3a into mrdoob:dev Dec 8, 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