title: Light coming out of a lamp model in three.js
body: <p>I've developed a 3D lamp model in blender and loaded it on to a web using <code>three.js</code>.</p>
  
  <p>The model is pretty basic, but what matters to me is that I would like somebody to give me an idea of how produce a light in <code>three.js</code> that should give the illusion of coming from inside the lamp, because you can find lots of examples of how to light an object from far away but what about of emitting the light from one side of an object (and specifically a model) like this lamp scenario.</p>
  
  <p>Please understand that I'm not being lazy, is just that the <code>three.js</code> documentation is so limited and I haven't been able to find an example or an explanation specific to my need.</p>
  
  <p>This is the code that I have so far which loads the model:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;example 1: load model&lt;/title&gt;
  &lt;script type="text/javascript" src="js/three.js"&gt;&lt;/script&gt;
  &lt;script src="js/TrackballControls.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
  var controls;
  var init = function() {
    var canv = document.getElementsByTagName("canvas")[0];
    var w = canv.clientWidth;
    var h = canv.clientHeight;
  
    var renderer = new THREE.WebGLRenderer({canvas:canv, antialias: true});
    renderer.setSize( w, h );
  
  
    var scene = new THREE.Scene();
  
    var camera = new THREE.PerspectiveCamera(
        40,     // Field of view
        w / h,  // Aspect ratio
        5,    // Near
        10000   // Far
    );
    camera.position.set( -10, 7, 10 );
    camera.lookAt(scene.position);
  
    // CONTROLS
   controls = new THREE.TrackballControls( camera );
  
    light = new THREE.PointLight( 0xFFFFDD );
    light.position.set( -15, 10, 15 );
    scene.add( light );
  
  
  
    var loader = new THREE.JSONLoader(  );
    var onGeometry = function(geom, mats) {
      var mesh = new THREE.Mesh( geom, new THREE.MeshFaceMaterial( mats ) );
      scene.add(mesh);
    };
    loader.load("models/lamp.js", onGeometry);
  
    var render = function() {
  
      renderer.render(scene, camera);
      controls.update();
    };
  
    setInterval(render,10);
  };
  
  window.onload = init;
  window.onresize = init;
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;&lt;canvas style="width:100%;height:95%;border:1px gray solid;"&gt;&lt;/body&gt;
  &lt;/html&gt;
  </code></pre>