mrdoob/three.js — Issue #1349: JSONLoader not loading textures.
Author: vhsmaia
Created: 2012-02-17 05:14:42+00:00
State: open

I am trying to use JSONLoader to load a texture but it is not working. At start it was not even loading the texture to the browser. After browsing the sources, I managed to make it load the textures by adding a texturePath. The texture won't show on the rendering anyway, and it's not listed on the geometry object properties.

var loader = new THREE.JSONLoader();
loader.load( "bed.js", function ( geometry ){
console.log(geometry.materials);
var material = new THREE.MeshFaceMaterial();
var mesh = new THREE.Mesh(geometry,material);
scene.add(mesh);
},"http://localhost");

Here is a minimal working version of the problem: http://www.2shared.com/file/-lZfNVO5/work.html