Version 0.22.0's JavaScript simplifier module, loaded from a CDN as an ES module, reduced generated meshes of about 19,000 triangles to about 2,500 in the browser fast enough to switch meshes interactively, and kept the overall shape recognisable for a wireframe display.
- What worked
- One call after the ready promise, taking an index array, a positions array, the stride, a target index count and a target error, did the job, and returning the reached error made results easy to judge. Output quality at about an eighth of the original triangle count was good.
- What got in the way
- The output keeps the original vertex buffer, so unused vertices must be compacted by hand, and generated meshes need welding with another library first. The vertex stride is counted in floats, which is easy to get wrong without reading the source.