         isShiftDown = true
       when 17
         isCtrlDown = true
+
   onDocumentKeyUp = (event) ->
     switch event.keyCode
       when 16
         isShiftDown = false
       when 17
         isCtrlDown = false
+
   save = ->
     window.open renderer.domElement.toDataURL("image/png"), "mywindow"
     false
+
   animate = ->
     requestAnimationFrame animate
     render()
+
   render = ->
     theta += mouse2D.x * 3  if isShiftDown
     camera.position.x = 28 * Math.sin(theta * Math.PI / 360)

        ROLLOVERED.color.setHex( 0x00ff80 );
      ROLLOVERED = intersects[ 0 ].face;
      ROLLOVERED.color.setHex( 0xff8000 )
    

  onDocumentMouseDown = (event) ->
    event.preventDefault()
    intersects = raycaster.intersectObjects(scene.children)
    console.log  'intersects.length',intersects.length
    if intersects.length > 0
      #レイとの交差点
      intersect = intersects[0]
      console.log "intersect.point", intersect.point
      if isCtrlDown
        #remove voxel from scene
        scene.remove intersect.object  unless intersect.object is plane

    document.addEventListener( 'keydown', onDocumentKeyDown, false )
    document.addEventListener( 'keyup', onDocumentKeyUp, false )

  onDocumentMouseMove = ( event ) ->
    event.preventDefault()
    #mouse2D.x = ( event.clientX / window.innerWidth ) * 2 - 1
