Some csg related algorithms with threejs and glsl