mrdoob/three.js — pull request #815 by grorg (2011-11-29 21:43:25+00:00)
Title: Extruded object materials and UV mapping of extruded geometry miscalculated

- ExtrudeGeometry was documented to take a Three.Material for the
"material" and "extrudeMaterial" parameters, but the examples and
usage in TextGeometry showed that these were in fact indices into
the materials array. This meant that the tests such as "if (material)"
would evaluate to false if the index passed in was 0 (a very typical
index to choose :). Simply have the tests check against undefined and
update the documentation.

- Also, the code that converted a shape into a set of triangles was
miscalculating the UV offsets. It was correctly dividing the UV by
the bounding box of the old shape, but was forgetting to offset the
value from the minimum (which potentially led to negative UVs).