3

I'm trying to get althe vertex of imported obj. Here is my code:

// model
var loader = new THREE.OBJLoader( manager );
loader.load( 'tagliatella.obj', function ( object ) {

    object.traverse( function ( child ) {
        if ( child.geometry !== undefined ) {

            console.log( child.geometry.vertices );

            for(i=0;i<child.geometry.length;i++){
                var point =child.geometry.vertices[i];
                //  console.log ( point );
            }
        }
    }
    );
    obj = object
    scene.add( obj );
Maihan Nijat
  • 9,054
  • 11
  • 62
  • 110
  • 1
    Welcome to SO. Please have a look at [the tour](http://stackoverflow.com/tour). You may also want to check [What topics can I ask about](http://stackoverflow.com/help/on-topic), and [How to ask a good question](http://stackoverflow.com/help/how-to-ask), and [The perfect question](http://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/), and how to create a [Minimal, Complete and Verifiable example](http://stackoverflow.com/help/mcve). Post the code you have tried and the errors you have received. Be as specific as possible as it will lead to better answers. – José Luis Nov 03 '16 at 16:12

0 Answers0