           when "MoveObjTo"
             moveObjTo(e.objId, e.pos)
           when "SpawnCube"
-            spawnCube()
+            spawnCube(container.clientWidth)
           when "DespawnObj"
             despawnObj(e.objId)
           else


        #TODO display message if Webgl required
        _renderer = new THREE.CanvasRenderer()
      _renderer.setSize(w, h)
      _renderer.setClearColorHex(0xEEEEEE, 1.0)
      _renderer.clear()
      container.appendChild(_renderer.domElement)

      # Lights
      #_scene.add( new THREE.AmbientLight( 0xFFFFFF ) );

          obj.position.y = pos.y
          obj.rotation.z = pos.a

      spawnCube = (w)->
        _cube = Cube(w / 50)
        _scene.add(_cube)

