     "translate(0, 0) translateZ(-#{ @size }px) rotate3d(1, 0, 0, #{ deg }deg)"
 
 
-  _onMouseDown: (e, cube) ->
+  _onTouchStart: (e, cube) ->
     e.preventDefault()
     @_touchStarted = true
     e.currentTarget.classList.add 'no-tween'
-    cube.y1 = e.pageY
-
-
-  _onMouseMove: (e, cube) ->
+    if e.type is 'mousedown'
+      cube.y1 = e.pageY
+    else
+      cube.y1 = e.touches[0].pageY
+
+
+  _onTouchMove: (e, cube) ->
+    return unless @_touchStarted
     e.preventDefault()
-    return unless @_touchStarted
     cube.diff = (e.pageY - cube.y1) * @_touchCoefficient
     cube.yDelta = cube.yLast - cube.diff
     @_setSides cube
 
 
-  _onMouseUp: (e, cube) ->
+  _onTouchEnd: (e, cube) ->
     @_touchStarted = false
     mod = cube.yDelta % 90
     if mod < 45

      cube[side].style[css.transform] = "rotate3d(#{ rotate3d }) translate3d(0, 0, #{ @size / 2 }px)"
      cube.el.appendChild cube[side]

    for eventType in ['MouseDown', 'MouseMove', 'MouseUp', 'MouseOut'] then do (eventType) =>
      cube.el.addEventListener eventType.toLowerCase(), (e) =>
        @['_on' + eventType] e, cube
      , true

    cube


        cube.yLast = cube.yDelta - (90 - mod)

    if cube.yLast % 90 isnt 0
      cube.yLast -= cube.yLast % 90

    cube.el.classList.remove 'no-tween'
    cube.el.style[transform] = @_getTransform cube.yLast


  _onTouchLeave: (e, cube) ->
    return unless @_touchStarted
    @_onTouchEnd e, cube if e.toElement and not cube.el.contains e.toElement



