     for set, cube of @cubes
       set = @sets[set]
       setLength = set.length
-      offset = cube.yLast / 90
+      offset = cube.last / 90
       if offset < 0
         if -offset > setLength
           offset = setLength - -offset % setLength

    cube.touchStarted = true
    e.currentTarget.classList.add 'no-tween'
    if e.type is 'mousedown'
      cube.y1 = e.pageY
    else
      cube.y1 = e.touches[0].pageY


  _onTouchMove: (e, cube) ->
    return unless cube.touchStarted
    e.preventDefault()
    cube.diff = (e.pageY - cube.y1) * @touchSensitivity
    cube.yDelta = cube.yLast - cube.diff
    @_setSides cube


  _onTouchEnd: (e, cube) ->
    cube.touchStarted = false
    mod = cube.yDelta % 90
    if mod < 45
      cube.yLast = cube.yDelta + mod
    else
      if cube.yDelta > 0
        cube.yLast = cube.yDelta + mod
      else
        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[css.transform] = @_getTransform cube.yLast


  _onTouchLeave: (e, cube) ->

  fontSize: 132
  perspective: 1000
  touchSensitivity: 1
  horizontalFlip: false

cssClass = baseName.toLowerCase()
faceNames = ['front', 'bottom', 'back', 'top', 'left', 'right']
