Algorithms
June 29, 2026
csgbooleansbenchmarksperformancecomparisonbrowserwebassembly

Comparison and Benchmarks of Browser Mesh Boolean Libraries at Industry Scale — 2026

Three client-side mesh boolean libraries on the Thingi10K corpus at 200K–1.5M polygons per operand: trueform, Manifold, three-bvh-csg. trueform is the fastest tested in the browser at 21.9 ms median, 12.6× faster than Manifold WASM and 41.2× faster than three-bvh-csg (geometric mean), closed and manifold on all 1000 pairs.

Žiga Sajovic, Polydera

Part of a series on the same Thingi10K corpus, also measured for native C++ and eight libraries and in Python.

Constructive solid geometry in the browser has meant small scenes: gluing a few primitives for a configurator, a parametric toy, a quick three.js demo. Anything real, a scanned medical mesh, an engineering part, a watertight solid you can 3D-print or simulate, went to a server or a desktop. At industry scale, 200K to 1.5M polygons per operand, that assumption no longer holds.

This is a comparison of the mesh boolean libraries that run client-side on the Thingi10K corpus: trueform, Manifold, and three-bvh-csg. Each in its as-shipped WebAssembly or JavaScript build, timed in the browser, arrays in to arrays out, the cost a web app actually pays.

The corpus25 of 1,000 Thingi10K pairs · 200K–1.5M polygons · two operands overlaid

Exact, watertight mesh booleans at industry scale now run in the browser, at interactive speed.

  • 21.9 ms median in WebAssembly, fastest on every one of the 1000 pairs, and faster in the browser than the other engines run natively.
  • Closed and manifold on all 1000 pairs. Manifold delivers the same watertight guarantee; three-bvh-csg returns a valid solid on 22.
  • No server, no install. The same exact kernel that ships in C++ and Python, compiled to WebAssembly and running in the tab.
Try it live Lunar trueform GitHub

The libraries

  • trueform 0.9.8npm install @polydera/trueform. Exact arrangements over a bounded integer kernel, compiled to WebAssembly. Closed, manifold output, the same engine as the native and Python builds.
  • Manifold 3.5npm install manifold-3d. A topological kernel for manifold meshes, with an official WebAssembly build. Produces exact, watertight solids in the browser, the genuine peer here.
  • three-bvh-csg 0.0.17npm install three-bvh-csg. A BVH-accelerated CSG evaluator for three.js, the popular choice for client-side booleans. Fast on small dynamic scenes, but it struggles with correctness at scale: on this corpus it returns a watertight solid on only 22 of 1000 pairs.

The wider JavaScript CSG lineage (csg.js and its descendants three-csg-ts and THREE-CSGMesh, and JSCAD) is BSP-based. It splits geometry recursively against partitioning planes, which is robust enough for a handful of primitives but does not scale to meshes of this size. CGAL and OpenCascade, the desktop heavyweights, do not run reliably in a browser: CGAL relies on floating-point rounding modes WebAssembly does not provide, and OpenCascade operates on BREP solids rather than triangle meshes.

Protocol

Each library is timed from input arrays (vertices, triangles) to output arrays of the same shape. Parsing the geometry into the library's own representation, the boolean, and reading the result back, all inside the timer. No amortisation: every structure is rebuilt on every operation.

Result agreement. trueform and Manifold returned a closed, manifold mesh on all 1000 pairs, with signed volumes that agree within floating-point tolerance. three-bvh-csg returned a watertight solid on 22; on the rest it produced an open mesh, so it is solving the same boolean less robustly. The comparison is wall-clock only.

Corpus. Random sets of solid, manifold, non-self-intersecting Thingi10K meshes, 200K to 1.5M polygons per operand. Each operand is normalised to unit extent, randomly rotated, and translated so the bounding boxes overlap; each pair takes the union. The same 1000-pair corpus as the native and Python benchmarks; Thingi10K IDs and per-operand counts are published.

Environment. Chrome 148 on an Apple M4 Max, macOS. trueform and Manifold run as WebAssembly; three-bvh-csg runs as JavaScript on top of three-mesh-bvh, as shipped.

Pairwise booleans

One union per pair across the 1000-pair corpus. trueform is fastest on every one of them.

librarymedian (ms)geomean × vs trueformvalid / 1000trueform 0.9.821.91.0×1000Manifold 3.5303.412.6×1000three-bvh-csg 0.0.17978.041.2×22

trueform and Manifold both clear the watertight bar in the browser; the difference between them is wall-clock. three-bvh-csg is the fastest of the JavaScript-native CSG tools, but at this scale it is the slowest of the three and returns a closed solid on only 22 of the 1000 pairs.

The WebAssembly cost

WebAssembly costs trueform roughly 1.4× over native: the C++ driver runs the same corpus at a 15.7 ms median, the WebAssembly build at 21.9 ms. The full eight-library native comparison, with N-ary scaling to N=64, is in the industry-scale benchmark.

At 21.9 ms median, trueform in the browser is still faster than every library in that comparison runs natively. The exact kernel does not have to leave the tab, which is what lets an interface, or an AI agent through Lunar, operate real geometry client-side.

trueform · Try it live · Lunar · GitHub · Documentation

Cite as
@article{polydera:browser-mesh-boolean-libraries-2026,
  title={Comparison and Benchmarks of Browser Mesh Boolean Libraries at Industry Scale — 2026},
  author={Sajovic, {\v{Z}}iga, Polydera},
  year={2026},
  url={https://polydera.com/algorithms/browser-mesh-boolean-libraries-2026},
  organization={Polydera}
}