Multiple .obj Models in THREE.js and detecting clicked objects

Posted by ZedBee on Stack Overflow See other posts from Stack Overflow or by ZedBee
Published on 2012-11-14T16:04:05Z Indexed on 2012/11/14 17:00 UTC
Read the original article Hit count: 371

Filed under:
|
|

I have been following along this example to load .obj Model using three.js. Since I needed more than one model to load so I tried this

loader.addEventListener( 'load', function ( event ) {

var object = event.content;

object.position.y = - 80;
scene.add( object );

});
loader.load( 'obj/model1.obj' );
loader.load( 'obj/model2.obj' );

First: I don't know whether this is the right approach or not since I searched but didn't find any tutorial loading more than one .obj models.

Second: I want to be able to click different models on the screen. I tried this which doest not seem to work for me. Any suggestions on this?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about webgl