Geometry.mergeVertices fix + webgl_geometry_normals.html example #2867

Merged
merged 3 commits into from Jan 3, 2013

Conversation

Projects
None yet
2 participants
@bhouston
Contributor

bhouston commented Dec 31, 2012

This PR fixes a set of bugs in Geometry.mergeVertices:

  • It did not handle Face3s that end up with duplicate vertices after a merge.
  • It did not handle Face4s that end up with more than one duplicate vertex after a merge.
  • It did not handle Face4s that has vertexNormals or vertexColors.

I wrote an example that demonstrates the last bug mentioned above and that it is fixed. It is webgl_geometry_normals.html. Just merge in this PR but do not regenerate three.js or three.min.js. Run the example and select the LatheGeometry -- it will not display properly. Now re-build three.js/three.mins.js via build.bat or equivalent. webgl_geometry_normals.html now works with all geometry types.

I don't have examples of the first two bugs in this PR, but I do demonstrate in the example that this code still functions as expected.

bhouston added some commits Dec 31, 2012

add webgl_geometry_normals.html - example that shows vertex normals a…
…nd face normals of standard geometry types before and after Geometry.mergeVertices

@mrdoob mrdoob merged commit 5bd3d04 into mrdoob:dev Jan 3, 2013

@mrdoob

This comment has been minimized.

Show comment Hide comment
@mrdoob

mrdoob Jan 3, 2013

Owner

Thanks!

Owner

mrdoob commented Jan 3, 2013

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment