My cone in the jsfiddle link is currently all blue, but I want to change the color of the square base to red. To do that, I need to alter the color of the two faces that make up the square base. How can this be achieved?
View my cone on JsFiddle: http://jsfiddle.net/sagh0900/suvKg/1/
function getGeometry(meshMaterial)
{
var cone;
var geo = new THREE.Geometry();
geo.vertices.push(new THREE.Vector3(0, 0, 0));
geo.vertices.push(new THREE.Vector3(-0.5, 0.5, 1));
geo.vertices.push(new THREE.Vector3(0.5, 0.5, 1));
geo.vertices.push(new THREE.Vector3(-0.5, -0.5, 1));
geo.vertices.push(new THREE.Vector3(0.5, -0.5, 1));
geo.faces.push( new THREE.Face3(0,1,2));
geo.faces.push( new THREE.Face3(2,1,4));
geo.faces.push( new THREE.Face3(1,3,4));
geo.faces.push( new THREE.Face3(4,3,0));
geo.faces.push( new THREE.Face3(3,1,0));
geo.faces.push( new THREE.Face3(0,2,4));
geo.computeFaceNormals();
cone = new THREE.Mesh(geo, meshMaterial);
cone.doubleSided = true;
cone.overdraw = true;
return cube;
}
Your assistance is much appreciated!