I noticed that LatheGeometry has a bug/contradiction and is slower than necessary:
This PR removes addresses the above via:
I updated webgl_geometry_normals.html (here: bhouston@f454d09 ) so that you can see the LatheGeometry examples with partial lathes and unclosed lathes and see that they all work correctly (and with correct normals after running Geometry.mergeVertices.)
robust support for multiple duplicate vertices in Face3 and Face4, ad…
…d handling of vertex colors and vertex UVs.
Geometry.mergeVertices: remove unused variables, rename non-descript …
…'o' to 'indices'.
add webgl_geometry_normals.html - example that shows vertex normals a…
…nd face normals of standard geometry types before and after Geometry.mergeVertices
Fix lathe-geometry in presence of angle < PI*2, add ability to specif…
…y phiStart, phiLength + optimize.
update weblgl_geometry_normals.html to show off partial LatheGeometries.
add unclosed top/bottom LatheGeometry examples to webgl_geometry_norm…
There are problems here with the UVs. I am not sure this was tested -- it looks like the problems existed before your recent changes.
Would you mind having a look at my dev-lathe branch, and providing a second opinion on my (very simple) attempt at addressing these issues. There is more than one way to solve this problem, but if you concur, I'll submit a PR.
One point -- the points array, I guess, is assumed to be increasing in z. Actually, it would be better to pass in a 2D THREE.Path in x and y, and rotate that around the x-axis, but I didn't change any of that.
@WestLangley, to resolve the shared vertices just call Geometry.mergeVertices(), I fixed it so that it will work correctly on LatheGeometry results. Remember that LatheGeometries are not necessary closed at the top and along the main seam so many simple approaches are not general solutions.
The reversal of the texture should be fairly easy to resolve, but it seems like this was done on purpose in the code so I left it in.
The entire texture should be mapped, I'll have a look at this.
@WestLangley, I just looked at your changes, I like them. You are using this.mergeVertices() which is by far the best method to fix the duplicate vertices. I am okay with the test of your changes. I would suggest doing a PR with your changes as I will support it.
@bhouston Done. Thank you for your code review. :-)