Skip to content

Instantly share code, notes, and snippets.

@willrjmarshall
Created September 21, 2011 00:26
Show Gist options
  • Save willrjmarshall/1230827 to your computer and use it in GitHub Desktop.
Save willrjmarshall/1230827 to your computer and use it in GitHub Desktop.
animateRotate: (frames, increment, current) ->
if frames > 0
current = current + increment
transform = 'translateZ(900px) rotateY(' + current + 'deg)'
for ring in @rings
ring.style.webkitTransform = transform
requestAnimFrame (=>
@animateRotate((frames - 1), increment, current)
), 0.1
else
@delegateEvents @events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment