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

Vector: Use MathUtils.clamp() internally #29812

Merged
merged 3 commits into from
Nov 6, 2024
Merged

Conversation

satelllte
Copy link
Contributor

Description

Consume MathUtils.clamp everywhere inside VectorN implementations for better readability

Copy link

github-actions bot commented Nov 5, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 692.55
171.49
692.21
171.45
-336 B
-38 B
WebGPU 822.23
221.94
821.89
221.91
-336 B
-35 B
WebGPU Nodes 821.34
221.74
821
221.7
-336 B
-37 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 464.89
112.3
464.56
112.27
-336 B
-33 B
WebGPU 542.43
146.79
542.09
146.75
-336 B
-33 B
WebGPU Nodes 498.37
136.53
498.03
136.5
-336 B
-36 B

@satelllte satelllte marked this pull request as ready for review November 5, 2024 14:13
@Mugen87 Mugen87 added this to the r171 milestone Nov 5, 2024
@Mugen87 Mugen87 merged commit 99a0210 into mrdoob:dev Nov 6, 2024
12 checks passed
@satelllte satelllte deleted the vector_clamp branch November 6, 2024 19:15
@WestLangley WestLangley changed the title Vector: Consume MathUtils.clamp internally Vector: Use MathUtils.clamp() internally Nov 6, 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.

2 participants