Jump to content

Multiple textures and JS models problem


bordanenko
 Share

Recommended Posts

Hi,

 

I'm load 2 models and 2 textures..but the first one is ok...and the second texture not loading..it stays black.

 

this is my code

 

var jsonLoader = new THREE.JSONLoader();
jsonLoader.load( "obj/MaleBody.js", addModelToScene01 );
jsonLoader.load( "obj/MaleHead.js", addModelToScene02 );
// addModelToScene function is called back after model has loaded
 
var ambientLight = new THREE.AmbientLight(0x111111);
scene.add(ambientLight);
 
}
 
// material
 
function addModelToScene01( geometry, materials ) 
{
var material = new THREE.MeshPhongMaterial( { map: THREE.ImageUtils.loadTexture('Maps/Body_diffuse.jpg') } ); 
android = new THREE.Mesh( geometry, material );
android.scale.set(7,7,7);
scene.add( android );
}
 
function addModelToScene02( geometry, materials ) 
{
var material = new THREE.MeshPhongMaterial( { map: THREE.ImageUtils.loadTexture('Maps/Head_diffuse.jpg') } ); 
android = new THREE.Mesh( geometry, material );
android.scale.set(7,7,7);
scene.add( android );
}
 
post-9424-0-20266700-1404148955.png
 
Any Ideias what i'm doing wrong?
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...