mrdoob/three.js — pull request #2845 by bhouston (2012-12-26 18:39:36+00:00)
Title: SphereGeometry, TorusGeometry are now created by an improved LatheGeometry, fixed Geometry mergeVertices bug

Improvements:

* There was a bug in Geometry.mergeVertices where vertexNormals and vertexColors were not properly maintained. This is fixed in this commit: https://github.com/bhouston/three.js/commit/f979cf0191d305df3289e5f352383c1c2e0a8e6c

* Rewrote LatheGeometry to be faster (no matrices) and simpler. Supports Sphere-like phiStart and phiRange instead of just "arc": https://github.com/bhouston/three.js/blob/3ba2dc723001937d55afdf5ec2202d81c03b961e/src/extras/geometries/LatheGeometry.js

* Simplified SphereGeometry by using LatheGeometry: https://github.com/bhouston/three.js/blob/3ba2dc723001937d55afdf5ec2202d81c03b961e/src/extras/geometries/SphereGeometry.js

* Simplified TorusGeometry by using LatheGeometry: https://github.com/bhouston/three.js/blob/3ba2dc723001937d55afdf5ec2202d81c03b961e/src/extras/geometries/TorusGeometry.js Now supports phiStart, phiLength, thetaStart, and thetaRange like SphereGeometry.

* Started Geometry unit tests: https://github.com/bhouston/three.js/commit/965fafe3ae0a9ae183fab12d3bbd4b06ae6c40fd

* Modified a number of other files to support the new LatheGeometry and TorusGeometry constructor arguments.