title: Using Three.js with Meteor
body: <p>I am trying to load the basic rotating cube example from the three.js getting started guide in to a basic meteor app:
  <a href="http://threejs.org/docs/index.html#Manual/Introduction/Creating_a_scene" rel="nofollow">http://threejs.org/docs/index.html#Manual/Introduction/Creating_a_scene</a></p>
  
  <pre><code>var scene = new THREE.Scene();
  var camera = new THREE.PerspectiveCamera(75, window.innerWidth/window.innerHeight, 0.1, 1000);
  
              var renderer = new THREE.WebGLRenderer();
              renderer.setSize(window.innerWidth, window.innerHeight);
              document.body.appendChild(renderer.domElement);
  
              var geometry = new THREE.CubeGeometry(1,1,1);
              var material = new THREE.MeshBasicMaterial({color: 0x00ff00});
              var cube = new THREE.Mesh(geometry, material);
              scene.add(cube);
  
              camera.position.z = 5;
  
              var render = function () {
                  requestAnimationFrame(render);
  
                  cube.rotation.x += 0.1;
                  cube.rotation.y += 0.1;
  
                  renderer.render(scene, camera);
              };
  
  I have added this code into a template js manager file of a new meteor app and then call the render function on the render of my template:
  
    Template.hello.rendered = function() {
           if (!this._rendered) {
               this._rendered = true;
               render();
           }
       }
  
  My template
  
  &lt;template name="hello"&gt;
  
      &lt;head&gt;
          &lt;title&gt;My first Three.js app&lt;/title&gt;
          &lt;style&gt;canvas { width: 100%; height: 100% }&lt;/style&gt;
      &lt;/head&gt;
  &lt;body&gt;
  &lt;/body&gt;
  
  &lt;/template&gt;
  </code></pre>
  
  <p>I have added three.js from atomosphere via:
  mrt add three
  and it loaded the package successfully into my app
  However, when I start meteor I am getting an error that THREE is undefined.
  I have tried moving three.js into the lib folder and that didn't work because I get an error that 'self' is undefined.  I think this should only load as a client library.  I have tried putting it with the client folder and below my manager file, but that didn't seem to work either and it seemed hacky.  It seems like meteorite installed packages should be loaded first, right?  WHy isn't this available from my template manager?</p>
  
  <p>Any help would be greatly appreciated.  I am new to both meteor and three.js so I think getting this basic demo working would really open my eyes.
  Thanks!</p>