title: What does object traverse mean in Three.js?
body: <p>I am trying to upload obj files into a WebGL scene using Three.js. I saw some sample codes like the one below which works great, but I want to know what does the command </p>
  
  <pre><code>object.traverse();
  </code></pre>
  
  <p>do? What will happen if we don't do traversing? Thank you.</p>
  
  <pre><code>// prepare loader and load the model
  var oLoader = new THREE.OBJLoader();
  oLoader.load('models/chair.obj', function(object, materials) {
  
  // var material = new THREE.MeshFaceMaterial(materials);
  var material2 = new THREE.MeshLambertMaterial({ color: 0xa65e00 });
  
  object.traverse( function(child) {
  if (child instanceof THREE.Mesh) {
  
    // apply custom material
    child.material = material2;
  
    // enable casting shadows
    child.castShadow = true;
    child.receiveShadow = true;
    }
    });
  
    object.position.x = 0;
   object.position.y = 0;
   object.position.z = 0;
   object.scale.set(1, 1, 1);
   lesson6.scene.add(object);
  });
  </code></pre>