mrdoob/three.js — Issue #965: Problem apply material
Author: corsaronero
Created: 2011-12-26 13:13:43+00:00
State: open

Hi I have a code

loader = new THREE.JSONLoader();

loader.load('obj/cube_legno/cubo_legno.js', function (geometry) {
mesh = new THREE.Mesh( geometry, new THREE.MeshNormalMaterial({ overdraw: true } ) );

scene.add( mesh );

} );
and into file cubo_legno.js have a url image material,
"materials": [	{
"DbgColor" : 15658734,
"DbgIndex" : 0,
"DbgName" : "Material",
"colorAmbient" : [0.0, 0.0, 0.0],
"colorDiffuse" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],
"colorSpecular" : [0.5, 0.5, 0.5],
"mapDiffuse" : "../legno_6.JPG",
"mapDiffuseWrap" : ["repeat", "repeat"],
"shading" : "Lambert",
"specularCoef" : 50,
"transparency" : 1.0,
"vertexColors" : false
}],

the image is found but does not apply

Thanks!!