javascriptthree.jsboolean-operationsthreecsg

how to optimize CSG Library by decreasing the resolution or the size or number of BSP trees?


I am trying to perform a boolean operation on 2 mesh files imported from objloader using THREE.js and ThreeCSG interactively for multiple times and in real time. I just wanted to ask if there is any ways to optimize the CSG code to decrease the run time of the boolean operation by decreasing the resolution (link) or the number or size of the BSP trees to make the program run real time or faster? the objects I am using are pretty big so this is one of the reasons its running slowly. Thanks in advance for all your help.


Solution

  • you can tinker with CSG.Plane.EPSILON parameter if you increase it the CSG operation should be faster, but more crude