I've been experimenting with different types of lights such as Directional, Spot, and Point, but none seem to cast a shadow on MeshFaceMaterial objects. Instead, the MeshFaceMaterial object just turns black.
Check out my Test Website (please note that it is constantly being updated).
Is there a way to create shadows on MeshFaceMaterials using lights? Does MeshFaceMaterial even support shadows? According to the documentation, it only affects objects using MeshLambertMaterial or MeshPhongMaterial.
Below is a sample code snippet showing how I am loading a .json model:
loader.load('sample-concrete.js', function ( geometry, materials ) {
mesh1 = new THREE.Mesh(
geometry, new THREE.MeshFaceMaterial( materials )
);
mesh1.rotation.x = -Math.PI / 2;
scene.add( mesh1 );
});
And here's an example of the material from my .json file:
"materials": [
{
"DbgIndex" : 0,
"DbgName" : "Steel",
"colorDiffuse" : [0.3059, 0.0471, 0.0471],
"colorAmbient" : [0.3059, 0.0471, 0.0471],
"colorSpecular" : [1.0000, 1.0000, 1.0000],
"transparency" : 1.0,
"specularCoef" : 25.0,
"vertexColors" : false
}
Thank you for your help!