I've been trying to change the color of a face, but I'm having trouble. When I use wireframe
, it looks like it's working fine. However, when I don't use it, the face doesn't seem to render properly.
var geo = new THREE.Geometry();
geo.vertices.push(new THREE.Vector3(1, 1, 0));
geo.vertices.push(new THREE.Vector3(1, 0, 0));
geo.vertices.push(new THREE.Vector3(0, 0, 0));
geo.faces.push(new THREE.Face3(0, 1, 2));
geo.faces[0].color = new THREE.Color('rgb(0,255,0)');
var mesh = new THREE.Mesh(geo, new THREE.MeshBasicMaterial({
vertexColors: THREE.FaceColors,
color: 0xff0000//,
//wireframe: true
}));
scene.add(mesh);
Check out the demo here: http://jsfiddle.net/yaxpberz/.