I’m updating a wireframe that changes its geometry often…
The problem is that when I call indexWireframe.needsUpdate = true; I noticed a drop in performance.
I’ve allocated a size to the mesh, and I set the drawrange: geometryWireframe.setDrawRange( 0, indexPosWireframe );
I was under the impression this would improve performance. I need it to go faster though.
geometryWireframe.toNonIndexed();
attributesWireframe.position.needsUpdate = true;
indexWireframe.needsUpdate = true;
geometryWireframe.computeBoundingBox();
geometryWireframe.computeBoundingSphere();
geometryWireframe.setDrawRange( 0, indexPosWireframe );
Is updating the index the same as creating a new geometry? I’m assuming it is faster than creating a new geometry, but I’m not sure.
Is there a way to improve the performance in this case?
edit: here is example of the issue: https://jsfiddle.net/h6zu982e/9/