     theta += mouse2D.x * 3  if isShiftDown
     camera.position.x = 28 * Math.sin(theta * Math.PI / 360)
     camera.position.z = 28 * Math.cos(theta * Math.PI / 360)
-    camera.lookAt target
-    raycaster = projector.pickingRay(mouse2D.clone(), camera)
+    camera.lookAt origin
+    raycaster = projector.pickingRay(mouse2D.clone(), camera) #ray from 2D to 3D
     renderer.render scene, camera
 
   #main

        #remove voxel from scene
        scene.remove intersect.object  unless intersect.object is plane
      else
        #add voxel to scene
        normalMatrix.getNormalMatrix intersect.object.matrixWorld
        normal = intersect.face.normal.clone()
        normal.applyMatrix3(normalMatrix).normalize()
        position = new THREE.Vector3().addVectors(intersect.point, normal)
        geometry = new THREE.CubeGeometry(1,1,1)
        i = 0
        while i < geometry.faces.length
          geometry.faces[i].color.setHex 0x00ff80
          i++
        material = new THREE.MeshLambertMaterial(vertexColors: THREE.FaceColors)
        voxel = new THREE.Mesh(geometry, material)
        voxel.position.x = Math.floor(position.x / 1) * 1 + 0.5
        voxel.position.y = Math.floor(position.y / 1) * 1 + 0.5
        voxel.position.z = Math.floor(position.z / 1) * 1 + 0.5

        voxel.position.x = 0
        voxel.position.y = 0
        voxel.position.z = 0
        console.log 'voxel.position', voxel.position
        voxel.matrixAutoUpdate = false
        voxel.updateMatrix()
        scene.add voxel

  light = new THREE.DirectionalLight( 0xffffff, 3 ); 
  light

MYTHREE.getCubeGeometry = ->
  geometry = new THREE.CubeGeometry(1,1,1)
  i = 0
  while i < geometry.faces.length
    geometry.faces[i].color.setHex 0x00ff80
    i++
  geometry


#---組み立て---
