Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

fix to create uv maps #1

Merged
merged 1 commit into from

2 participants

@substack

No description provided.

@maxogden maxogden merged commit bad6e0a into maxogden:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 4, 2013
  1. @substack

    fix to create uv maps

    substack authored
This page is out of date. Refresh to see the latest.
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])
Something went wrong with that request. Please try again.