ThreeCSG icon indicating copy to clipboard operation
ThreeCSG copied to clipboard

little error in retrieving the normals from the geometry

Open radcheb opened this issue 10 years ago • 4 comments

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.

radcheb avatar Jul 24 '14 11:07 radcheb

Why's that?

chandlerprall avatar Jul 31 '14 11:07 chandlerprall

Because you should use all the normal while you're using twice the vertexNormals[2].

radcheb avatar Jul 31 '14 12:07 radcheb

There is already a pull request for this issue here

Wilt avatar Jan 13 '16 14:01 Wilt

Merged #16

chandlerprall avatar Jan 13 '16 16:01 chandlerprall