I’m creating edges for my models (which can contain 50+ meshes), in a loop in the following way…
let edges = new THREE.EdgesGeometry(mesh[i].geometry, 40);
let bufferGeometry = new THREE.BufferGeometry();
bufferGeometry.attributes = edges.attributes;
lines = new THREE.LineSegments(bufferGeometry, lineBasicMaterial);
edges.dispose();
mesh[i].add(lines);
it works fine however on some models it hangs for 1-2 minutes creating the edges, causing chrome to moan about it being unresponsive. When running the chrome performance tools I could see it was mergeVertices that was causing the delay when it creates the new THREE.edges geometry.
so my questions…
- Can I control the mergeVertices that is occurring at all in the hope to improve performance (change the tolerance maybe?)?
- What factors affect the mergeVertices, is it purley the quantity?
- Is the above still the appropriate way to create edges for my meshes (each mesh has to have separate edge lines so i can fiddle with them independently later)