   theta = 45
   isShiftDown = false
   isCtrlDown = false
-  target = new THREE.Vector3( 0, 4, 0 )
+  origin = new THREE.Vector3( 0, 0, 0 )
   normalMatrix = new THREE.Matrix3()
   ROLLOVERED = null
   


  onDocumentMouseMove = ( event ) ->
    event.preventDefault()
    #mouse2D.x = ( event.clientX / window.innerWidth ) * 2 - 1
    #mouse2D.y = - ( event.clientY / window.innerHeight ) * 2 + 1
    offsetY = $("#header").height()
    canvasX = event.clientX
    canvasY = event.clientY + offsetY
    mouse2D.x = ( canvasX / MYTHREE.const.W ) * 2 - 1
    mouse2D.y = - ( canvasY / MYTHREE.const.W ) * 2 + 1
    #console.log("mouse X, Y", mouse2D.x, mouse2D.y); #-1.0 ~ 1.0 
    intersects = raycaster.intersectObjects( scene.children )
    if intersects.length > 0
      if ( ROLLOVERED ) 
        ROLLOVERED.color.setHex( 0x00ff80 );
      ROLLOVERED = intersects[ 0 ].face;
      ROLLOVERED.color.setHex( 0xff8000 )
  
  #複数の交差点からfaceがセットされているものを返す
  getFacedIntersect = (intersects) ->

        #remove voxel from scene
        scene.remove intersect.object  unless intersect.object is plane
      else
        #draw cube
        normalMatrix.getNormalMatrix intersect.object.matrixWorld
        normal = intersect.face.normal.clone()
        normal.applyMatrix3(normalMatrix).normalize()
        position = new THREE.Vector3().addVectors(intersect.point, normal)
        geometry = MYTHREE.getCubeGeometry()
        material = new THREE.MeshLambertMaterial(vertexColors: THREE.FaceColors)
        voxel = new THREE.Mesh(geometry, material)
        voxel.position.x = Math.floor(position.x) + 0.5
        voxel.position.y = Math.floor(position.y) + 0.5
        voxel.position.z = Math.floor(position.z) + 0.5
        voxel.matrixAutoUpdate = false
        voxel.updateMatrix()
        scene.add voxel
