title: Why lighting isn't working in Three.js?
body: <p>I don't understand why the lighting does not work in my code. I downloaded a simple OBJ. file to test the OBJLoader but the model isn't affected. Before I edited the lighting more, at least the Ambient Lighting would work. Maybe the OBJ. model needs a texture?</p>
  
  <pre><code>            var container, stats;
  
          var camera, scene, renderer, controls;
  
  
          init();
          animate();
  
  
          function init() {
  
              container = document.createElement( 'div' );
              document.body.appendChild( container );
  
              scene = new THREE.Scene();
  
              camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 2000 );
              camera.position.z = 2.5;
              scene.add( camera );
  
              controls = new THREE.TrackballControls( camera );
  
              controls.rotateSpeed = 2.0;
              controls.zoomSpeed = 1.2;
              controls.panSpeed = 0.0;
  
              controls.noZoom = false;
              controls.noPan = true;
  
              controls.staticMoving = true;
              controls.dynamicDampingFactor = 0.3;
  
              controls.keys = [ 65, 83, 68 ];
  
              controls.addEventListener( 'change', render );
  
              var ambient = new THREE.AmbientLight( 0x020202 );
              scene.add( ambient );
  
              directionalLight = new THREE.DirectionalLight( 0xffffff );
              directionalLight.position.set( 1, 1, 0.5 ).normalize();
              scene.add( directionalLight );
  
              pointLight = new THREE.PointLight( 0xffaa00 );
              pointLight.position.set( 0, 0, 0 );
              scene.add( pointLight );
  
              sphere = new THREE.SphereGeometry( 100, 16, 8 );
              lightMesh = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( { color: 0xffaa00 } ) );
              lightMesh.scale.set( 0.05, 0.05, 0.05 );
              lightMesh.position = pointLight.position;
              scene.add( lightMesh );
  
  
              var loader = new THREE.OBJLoader();
              loader.load( "originalMeanModel.obj", function ( object ) {
                  scene.add( object );
              } );
  
              renderer = new THREE.WebGLRenderer();
              renderer.setSize( window.innerWidth, window.innerHeight );
              container.appendChild( renderer.domElement );
  
          }
  
          function animate() {
  
              requestAnimationFrame( animate );
              controls.update();
  
          }
  
          function render() {
  
              camera.lookAt( scene.position );
  
              renderer.render( scene, camera );
  
          }
  </code></pre>