EDIT: This post was the year I answered it, and it seems like my answer was posted shortly before the API change. This answer will not work (trusting the words of Kumar Sanket Sahu , did not check)
Even if it's older than a year since I found it now when searching for a solution:
textureloader gives you a callback after loading the texture:
var texloader = new THREE.TextureLoader(); texloader.load("second.jpg", function(tex) { var mat = new THREE.MeshBasicMaterial({ map: tex }); var loader = new THREE.JSONLoader(); loader.load( "js/JsonModels/toothz.js", function( geometry, mat ) { mat[0].shading = THREE.SmoothShading; material = new THREE.MeshFaceMaterial( mat); mesh = new THREE.Mesh( geometry, material ); mesh.scale.set( 3, 3, 3 ); mesh.position.y = 0; mesh.position.x = 0; scene.add( mesh ); } ); });
This works as an example.
source share