btw, had a a little bit fund with threejs and batchedmesh and its really cool what performance boost it gives..
Some info whats its doing.. (yes its not a box.. but it was in the beginning ๐ )
This is 5700xt and some amd 8 core cpu a few years old..
const material = new MeshStandardMaterial({ color: 0x00ff00 });
const boxes = 1000;
const box = new SphereGeometry( 5, 50, 50 );
const maxIndexCount = (box.getIndex()?.count || 1) * boxes;
const maxVertexCount = box.getAttribute("position").count * boxes;
for (let y = 0; y < 40; y++) {
const mesh = new BatchedMesh(boxes, maxVertexCount, maxIndexCount, material);
mesh.sortObjects = false;
mesh.perObjectFrustumCulled = false;
for (let i = 0; i < boxes; i++) {
const id = mesh.addGeometry(box);
mesh.setMatrixAt(id, randomizeMatrix(matrix));
}
scene.add(mesh);
}
animate();