Created
June 29, 2012 14:38
-
-
Save obeattie/3018313 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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