Permalink
Browse files

Merge pull request #1 from substack/uv

fix to create uv maps
  • Loading branch information...
2 parents e4e6228 + 51a8e70 commit bad6e0ad6dbb3aadc9f9a5300d21902923e93d51 @maxogden committed Jan 4, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 index.js
View
7 index.js
@@ -24,6 +24,13 @@ function Mesh(data, scaleFactor, mesher) {
}
for (var i = 0; i < result.faces.length; ++i) {
+ geometry.faceVertexUvs[0].push([
+ new THREE.Vector2(0, 0),
+ new THREE.Vector2(0, 1),
+ new THREE.Vector2(1, 1),
+ new THREE.Vector2(1, 0)
+ ])
+
var q = result.faces[i]
if (q.length === 5) {
var f = new THREE.Face4(q[0], q[1], q[2], q[3])

0 comments on commit bad6e0a

Please sign in to comment.