   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
       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(50, 50, 50)
+        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 / 50) * 50 + 25
-        voxel.position.y = Math.floor(position.y / 50) * 50 + 25
-        voxel.position.z = Math.floor(position.z / 50) * 50 + 25
+        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
+        console.log 'voxel.position', voxel.position
         voxel.matrixAutoUpdate = false
         voxel.updateMatrix()
         scene.add voxel
+
   onDocumentKeyDown = (event) ->
     switch event.keyCode
       when 16

    mouse2D = new THREE.Vector3( 0, 10000, 0.5 )
    scene.add( new THREE.AmbientLight( 0x606060 ))
    scene.add( MYTHREE.getDirectionalLight() )
    renderer = new MYTHREE.getRenderer()
    container.appendChild(renderer.domElement); #<canvas>
    $('canvas').attr('id', 'canvas_id')


#ヒット用平面
MYTHREE.getRayHitPlane = ->
  plane = new THREE.Mesh( new THREE.PlaneGeometry( 20, 20 ), new THREE.MeshBasicMaterial() );
  plane.rotation.x = - Math.PI / 2;
  plane.visible = false;
  plane
