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

BatchedMesh: Add optimize(). #29527

Merged
merged 9 commits into from
Sep 30, 2024
Merged

BatchedMesh: Add optimize(). #29527

merged 9 commits into from
Sep 30, 2024

Conversation

gkjohnson
Copy link
Collaborator

@gkjohnson gkjohnson commented Sep 29, 2024

Related issue: #29463, #28638

Description

Based on #29523 (must merge first)

Adds an "optimize" function to BatchedMesh that shifts geometry internally to overwrite the memory of unused / deleted geometry data. The method used here does not require any id mapping or indirection and just adds a new function.

cc @agargaro @Makio64 @Shakhriddin

@gkjohnson gkjohnson added this to the r170 milestone Sep 29, 2024
Copy link

github-actions bot commented Sep 29, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 687.47
170.27
688.13
170.5
+655 B
+230 B
WebGPU 806.14
217.06
806.79
217.29
+655 B
+236 B
WebGPU Nodes 805.64
216.92
806.3
217.16
+655 B
+235 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 462.85
111.79
462.85
111.79
+0 B
+0 B
WebGPU 535.59
144.55
535.59
144.55
+0 B
+0 B
WebGPU Nodes 491.75
134.31
491.75
134.31
+0 B
+0 B

@gkjohnson gkjohnson marked this pull request as ready for review September 29, 2024 19:10
@Mugen87 Mugen87 changed the title BatchedMesh: Add "optimize" function BatchedMesh: Add optimize(). Sep 30, 2024
@gkjohnson gkjohnson merged commit 7ede9aa into mrdoob:dev Sep 30, 2024
12 checks passed
@gkjohnson gkjohnson deleted the batch-optimize branch September 30, 2024 09:19
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