I need to construct 3D models for use with Three.js
, but I need to do CSG (Constructive Solid Geometry) operations on them too. I managed to use the ThreeCSG.js
library for this, but I find this to be quite slow (about 5 seconds to slice about 30 holes from a complex shape).
Somehow I need to cache the geometry that is constructed, but since the construction of 3D geometry now happens only on the client side in the browser (with Javascript) I have no way of doing this on the server, which uses PHP.
- Are there any 3D libraries in PHP (that can do CSG as well) ?
- What's the best way to pre-calculate 3D models for later use in Three.js ?