ThreeCSG
ThreeCSG copied to clipboard
little error in retrieving the normals from the geometry
In the file "csg.js/csg.js" line48:
vertex = new ThreeBSP.Vertex( vertex.x, vertex.y, vertex.z, face.vertexNormals[2], uvs );
I think we should get the normal from the array vertexNormals with key 1 instead of key 2:
vertex = new ThreeBSP.Vertex( vertex.x, vertex.y, vertex.z, face.vertexNormals[1], uvs );
Thanks, Radhwane C.
Why's that?
Because you should use all the normal while you're using twice the vertexNormals[2].
There is already a pull request for this issue here
Merged #16