Skip to content

Instantly share code, notes, and snippets.

@obeattie
Created June 29, 2012 14:38
Show Gist options
  • Save obeattie/3018313 to your computer and use it in GitHub Desktop.
Save obeattie/3018313 to your computer and use it in GitHub Desktop.
### Use the standard LV.Ticker event loop for jQuery animations, too (which uses requestAnimationFrame under the
covers, if supported by the client) ###
class LV.JQAnimation extends LV.Animation
constructor: (timer) ->
@timer = timer
@start()
return
step: () ->
@stop() if not @timer()
return
$.fx.timer = (timer) ->
### Wrap the timer inside an LV.Animation, so we get all those snazzy things ###
new LV.JQAnimation(timer)
return
$.fx.stop = $.fx.tick = $.noop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment