johnpolacek / superscrollorama

The original jQuery plugin for supercool scroll animation. NOTE: No longer under active development. New version is ScrollMagic.js
http://johnpolacek.github.com/superscrollorama/
2.39k stars 540 forks source link

smooth animation #12

Closed oemueller closed 12 years ago

oemueller commented 12 years ago

Hi, in my case the animations were not that smooth sometimes, so I replaced the setTimeout with TweenMax's "tick" Event. Since it uses animation frames my tweens are animating smoother now.

var tickHandler = function() { if (didScrollCheck) { checkScrollAnim(); didScrollCheck = false; } };

TweenLite.ticker.addEventListener("tick", tickHandler);

johnpolacek commented 12 years ago

Nice one. Updated now. Thanks!