janpaepke / ScrollMagic

The javascript library for magical scroll interactions.
http://ScrollMagic.io
Other
14.88k stars 2.17k forks source link

Hello #135

Closed julianshapiro closed 10 years ago

janpaepke commented 10 years ago

Hi Julian, thank you for your interest but at least for now I will have to respectfully decline. I do see Velocity's potential but apart from technical barriers preventing me from switching to it, there are some of your arguments I disagree with...


License: This is a valid point but really only relevant to people who want to make money using the plugin – not even all commercial use. I think it's fair to charge them if they intend to charge other users. Of course a full open source solution would be preferable, but GSAP is huge and wouldn't be where it is if it were a side project.

Speed: So far every test I've seen and every test I made myself either didn't show any difference in terms of performance or GSAP had the edge. I would love to see some tests to prove your claim.

Browser support: GSAP actually goes back to IE6. There are no notes about Android, but my guess is it works.

File size: This is only true if you compare it to the whole package, which contains an abundance of more features than Velocity. If you compare it to TweenLite only, which offers about the same feature set, it's actually bigger. (Tween Lite is about 7kb)

Scrolling support: I see your point, but expressiveness is sometimes a little subjective. I for one think that the usage of TweenMax ScrollTo plugin is equally intuitive.

There are actually many other arguments, why I think GSAP is the best animation platform but that is not the issue here...


That being said I would definitely consider extending ScrollMagic to work with Velocity if it was technically possible. And for that to be the case there is one central element missing: A reference to the animation itself. As of now in velocity you just trigger animations and after they are called you "loose all control". There is no reference to the specific animation. No way of referencing or passing a reference of the animation. No way of pausing an animation. No way of resuming an animation. No way of reversing an animation. * No way of setting the progress of an animation (essential to ScrollMagic). No way of modifying anything about the animation, once it was called.

Because of the way velocity is structured (elem -> velocity as oposed to TweenMax -> elem) I don't even see how this could be implemented with the current architecture. Just imagine there are multiple animations happening on a single div but only one of them should be modified or bound to scroll progress. How would you identify it?

But as I said I'd be happy to extend ScrollMagic's capabilities once Velocity offers the appropriate interface(s). So get back to me once that is the case.

best regards, Jan

P.S.: A side note: On my MacBook Pro retina I can't see the complete list of items in the glossary on your documentation page, because they don't scroll.

*I am aware of the reverse method, but how would I reverse a specific animation, if there are multiple ones happening on one div?