I'm using three.js for generating curved shapes using parametric functions. In the three.js javascript file, the THREE.ParametricGeometry function repeatedly pushes 2D vectors into the faceVertexUvs variable. What is the point of this and what does the faceVertexUvs array do?
var a, b, c, d;
var uva, uvb, uvc, uvd;
var uvs = this.faceVertexUvs[ 0 ];
for ( i = 0; i < stacks; i ++ ) {
for ( j = 0; j < slices; j ++ ) {
a = i * sliceCount + j;
b = i * sliceCount + j + 1;
c = ( i + 1 ) * sliceCount + j + 1;
d = ( i + 1 ) * sliceCount + j;
uva = new THREE.Vector2( j / slices, i / stacks );
uvb = new THREE.Vector2( ( j + 1 ) / slices, i / stacks );
uvc = new THREE.Vector2( ( j + 1 ) / slices, ( i + 1 ) / stacks );
uvd = new THREE.Vector2( j / slices, ( i + 1 ) / stacks );
faces.push( new THREE.Face3( a, b, d ) );
uvs.push( [ uva, uvb, uvd ] );
faces.push( new THREE.Face3( b, c, d ) );
uvs.push( [ uvb.clone(), uvc, uvd.clone() ] );
}
}