ThreeCSG
ThreeCSG copied to clipboard
Remove duplicate methods
There are two methods ThreeBSP.Node
and ThreeBSP.Node.prototype.build
that if I am not mistaken seem to do exactly the same.
Maybe one of them can be removed (duplicate code).
They definitely do the same thing. The ThreeBSP.Node
constructor should do
this.polygons = [];
this.front = this.back = undefined;
if ( !(polygons instanceof Array) || polygons.length === 0 ) return;
and then call this.build(polygons);
to use the method