title: three.js - geometry.faceVertexUvs[0][0][index] is not the same as geometry.vertices[index]
body: <p>As far as I understand it, you can access the uv coords ("texels") of each vertex of a mesh using:</p>
  
  <pre><code>geometry.faceVertexUvs[ materialIndex ][ faceIndex ][ vertexIndex ]
  </code></pre>
  
  <p>What I am struggling with is that the <code>vertexIndex</code> seems to follow a different mapping order than</p>
  
  <pre><code>geometry.vertices[ vertexIndex ]
  </code></pre>
  
  <p><strong>I have created an example demonstrating this problem: <a href="http://andrewray.me/stuff/test-uv2.html" rel="nofollow">http://andrewray.me/stuff/test-uv2.html</a></strong></p>
  
  <p><strong>Source</strong>: <a href="http://andrewray.me/stuff/uv2.js" rel="nofollow">http://andrewray.me/stuff/uv2.js</a></p>
  
  <p>The above code does the following:</p>
  
  <ul>
  <li>Creates a plane</li>
  <li><p>Draws a sphere at the location of the plane's vertex of index <code>1</code> using a utility <code>dot</code> function:</p>
  
  <p><code>dot( floor.localToWorld( floor.geometry.vertices[1].clone() ) );</code></p></li>
  <li><p>Modifies the texel at <code>faceVertexUvs[0][0][1]</code> so we can see where texel <code>1</code> is</p>
  
  <p><code>floor.geometry.faceVertexUvs[0][0][1].add( new THREE.Vector2( 0.4, 0 ) );</code></p></li>
  </ul>
  
  <p>You can see in the example page, the sphere is being drawn on the top right of the plane (location of vertex 1), while the texel being modified is on the bottom left of the plane. The indices of the vertices do not line up! <strong>Is this a three.js bug, or am I missing something about texels?</strong></p>
  
  <p>I have found that the vertices seem to map like this:</p>
  
  <pre><code>texel index | vertex index
  0           | 3
  1           | 1
  2           | 0
  3           | 2
  </code></pre>
  
  <p>However, I am seeing some other unexpected behavior while trying to accomplish a related uv mapping task, so I don't know if the mapping is the source of my error.</p>