Here’s an example using meshoptimizer to simplify three.js mesh geometry —
In this example, I’ve overwritten only the ‘index’ selecting which vertices to draw. If you’ll be drawing the unsimplified mesh again later (like for an LOD system) then this would be the more efficient way to go. If you are never going to use the unsimplified mesh again, then you could additionally the ‘compactMesh’ method to compute a remap table and get rid of the unused vertices from the vertex attributes.
Note that geometry should be indexed before simplification. Either with three.js mergeVertices or gltf-transform weld input.glb output.glb
.