           y = -@panelHeight + 1
 
     [x, y]
+
+
+  _getRotation: (anchor, angle) ->
+    switch anchor
+      when 'left'
+        [0, 1, 0, angle]
+      when 'right'
+        [0, 1, 0, -angle]
+      when 'top'
+        [1, 0, 0, angle]
+      when 'bottom'
+        [1, 0, 0, -angle]
 
 
   _setShader: (i, anchor, deg) ->

    @lastAngle = angle = @_normalizeAngle angle
    angle /=  @_getPanelType anchor

    if anchor is 'right' or anchor is 'bottom'
      angle = -angle

    if anchor is 'left' or anchor is 'right'
      rotation = [0, 1, 0, angle]
    else
      rotation = [1, 0, 0, -angle]

    for panel, i in @panels[anchor]
      panel.style[css.transform] = @_transform @_getXy(i, anchor), rotation

      else
        deg *= 2 unless i is 0

      rotation = @_getRotation anchor, deg
      if options.fracture
        rotation = [1, 1, 1, rotation[3]]

      panel.style[css.transform] = @_transform @_getXy(i, anchor), rotation

