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: Consolidate internal geometry information #29687

Merged
merged 14 commits into from
Oct 18, 2024

Conversation

gkjohnson
Copy link
Collaborator

@gkjohnson gkjohnson commented Oct 18, 2024

Related issue: #29624, #29603

Description

Clean up for the BatchedMesh class to make things a little bit more clear and easier to manage:

(removed the following changes to reduce noise in the change set, will re-add them in a followup)

  • Remove some unnecessary global fields
  • Rename "drawInfo" to "instanceInfo" for clarity
  • - Expose information about instance count, unused vertex & index count so applications can make decisions about whether geometries can be added.

Once the class is finished and cleaned up I'll make an issue to discuss how we should move forward with the BatchedMesh implementation.

Copy link

github-actions bot commented Oct 18, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 690.8
171.12
690.9
171.07
+93 B
-51 B
WebGPU 816.46
220.09
816.55
220.03
+93 B
-55 B
WebGPU Nodes 815.97
219.96
816.06
219.9
+93 B
-56 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 463.45
111.9
463.45
111.9
+0 B
+0 B
WebGPU 538.64
145.42
538.64
145.42
+0 B
+0 B
WebGPU Nodes 494.75
135.28
494.75
135.28
+0 B
+0 B

@gkjohnson gkjohnson marked this pull request as ready for review October 18, 2024 10:47
@gkjohnson gkjohnson changed the title BatchedMesh: Batched class cleanup BatchedMesh: Consolidate internal geometry information Oct 18, 2024
@gkjohnson gkjohnson added this to the r170 milestone Oct 18, 2024
@gkjohnson gkjohnson merged commit d74ecc5 into mrdoob:dev Oct 18, 2024
12 checks passed
@gkjohnson gkjohnson deleted the batched-cleanup branch October 18, 2024 12:38
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.

BatchedMesh edge case: wrong frustum when perObjectFrustumCulled = false
2 participants