csg.js
Constructive solid geometry on meshes using BSP trees in JavaScript
csg.js is a JavaScript library implementing constructive solid geometry (CSG) operations on polygonal meshes using BSP trees. With CSG, you build complex 3D shapes by combining primitives using Boolean operations like union, subtract, and intersect. The library focuses on clarity and correctness: its implementation is intentionally concise and readable so developers can understand the algorithm, while still correctly handling tricky edge cases such as overlapping coplanar polygons. A WebGL-based demo shows how two solids can be combined interactively in the browser, making it a great educational tool for learning CSG concepts. ...