Skip to content

Conversation

@sunag
Copy link
Collaborator

@sunag sunag commented Jun 5, 2025

Fixes #30168

Description

Check attributes version of the geometry for dynamic replacement. Like:

mesh.geometry.attribute.offset = new THREE.InstancedBufferAttribute( .. );
mesh.geometry.attribute.offset.needsUpdate = true;

@github-actions
Copy link

github-actions bot commented Jun 5, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 337.4
78.67
337.4
78.67
+0 B
+0 B
WebGPU 553.89
153.48
554.16
153.51
+263 B
+33 B
WebGPU Nodes 553.24
153.32
553.51
153.36
+263 B
+32 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 468.59
113.33
468.59
113.33
+0 B
+0 B
WebGPU 628.86
170.19
629.13
170.23
+263 B
+40 B
WebGPU Nodes 583.72
159.53
583.98
159.56
+263 B
+38 B


let staticVao;

( { vaoGPU, staticVao } = this._createVao( renderObject.getAttributes() ) );
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@RenaudRohlinger @aardgoose I made some changes to staticVao, making it fixed but relating it to the attributes but keeping it shared by vaoKey, in case you have any additional observations about this change in your tests.

@sunag sunag added this to the r178 milestone Jun 5, 2025
@sunag sunag marked this pull request as ready for review June 5, 2025 14:31
@sunag sunag merged commit b916c16 into mrdoob:dev Jun 6, 2025
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.

Replacing an attribute of a geometry instanced by another new attribute with a superior length break the renderer

1 participant