I am familiar with dynamically creating a mesh in three.js, but I am uncertain about how to incorporate custom UV and normals into the mesh. Could someone please explain how to programmatically add UV and normals to this custom mesh?
Thank you!
var texture = THREE.ImageUtils.loadTexture(image);
var geometry = new THREE.Geometry();
geometry.vertices.push(new THREE.Vector3(0.895813, 0.732893, 0));
geometry.vertices.push(new THREE.Vector3(-1.007173, 0.732893, 0));
geometry.vertices.push(new THREE.Vector3(0.895813, -1.390674, 0));
geometry.vertices.push(new THREE.Vector3(-1.007173, -1.390674, 0));
var triangle = new THREE.Face3(2, 3, 1);
geometry.faces.push(triangle);
triangle = new THREE.Face3(0, 2, 1);
geometry.faces.push(triangle);
var customMesh = new THREE.Mesh(geometry, new THREE.MeshLambertMaterial(texture));
customMesh.doubleSided = true;
scene.add(customMesh);