greensock / GSAP

GSAP (GreenSock Animation Platform), a JavaScript animation library for the modern web
https://gsap.com
19.58k stars 1.72k forks source link

Finally new competition from jsMorph. #136

Closed johnpittman closed 8 years ago

johnpittman commented 8 years ago

From time to time I check to see if there are any newcomers to the JS DOM animation market. I came across jsMorph which is in alpha state but is MIT. It does however reuse the tween objects which helps alleviate garbage collections and allocation performance. Thought you JS tween pros could check it out and throw back a little review.

jackdoyle commented 8 years ago

Is your goal in opening an "issue" with GSAP to solicit feedback about how it compares to jsMorph? I could write a very lengthy review/comparison (I have lots to say) but I really try to steer clear of that type of thing in most cases because I don't want to risk insulting another developer's hard work. I'm sure there's a lot to like about jsMorph. My mind immediately rushes to some features in GSAP that I think are critically important and unique, but again, if I start listing those off it can come across as insulting or snobbish.

The only thing I will say is that I've done a lot of testing and research on the whole "reusing tween objects to alleviate garbage collection" and there are a ton of misunderstandings around that. It sounds really good in theory but in reality there can be some heavy costs because you must "clean" those objects which eats up resources and can actually be more costly performance-wise. Also, it can be problematic in an object-oriented framework where people may hang on to tween references so that they can restart() them later (or whatever) and if you reuse objects internally, it can mess that up (your tween instance might get re-used underneath you and you'd be restarting a different animation altogether). Perhaps jsMorph solved all those problems though (I'm not entirely sure how that's possible, but there are certainly people way smarter than me out there).

I'll leave this issue open for a short time in case anyone else wants to chime in.

johnpittman commented 8 years ago

Sorry for opening an issue for this. After a few minutes went by I realized there are better ways I could have gotten your opinion. I think I just got excited. Still feeling the effects of the Famous framework team disbanding.

jackdoyle commented 8 years ago

No problem at all. Is your primary goal to find a way not to use GSAP? You mention grieving the famo.us team disbanding and you seemed excited about jsMorph (specifically mentioning MIT license), but clearly you're at least somewhat familiar with GSAP so I'm wondering what the resistance is. What can we do that would make you excited to use GSAP rather than looking for alternatives? Where does the reluctance come from? (Or did I misread things?)

johnpittman commented 8 years ago

Licensing at jobs where people are cheap and don't understand the benefits of the investment. Originally when I came across GSAP in the early stages a few years back when I first anchored down into javascript coming from game development I immediately began building out an animation library but realized you already nailed it. Personally, I have no problem with the license because I think it's fair for what you get although the amount of resistance I get from all of the guys that tunnel CSS transitions that don't understand the beauty of control really sucks and they are the ones reluctant to want to adopt because of licensing when CSS is free. So when I come across a new library arises that can perform in line with GSAP or above and is MIT, yes, I get excited so the non-visionaries might come around since I am out numbered. Utilizing a framework like famous.org was my way to get around worrying about jigger during complexes interactions of any magnitude across all devices.

jackdoyle commented 8 years ago

Ah yes, that makes more sense now. Thanks for the added details and the positive comments. It's reassuring to know that you see the value (even if some co-workers don't)

Strangely enough, the very thing that some people object to (our licensing model) is what has enabled us to build such a robust, performant toolset. It has taken an immense amount of ongoing full-time work to build, maintain, document, and support the framework and then there's the continued innovation of the tools and training materials we try to crank out. Most other libraries simply cannot sustain that level of ongoing effort which means you're at greater risk when you build something that depends on tools that may have a spike of popularity today and then stagnate in a few months or a year. But that model is fantastic for certain types of tools and development styles. So I'm not knocking open source at all. GreenSock isn't for everyone. But for professional animators who recognize the level of refinement and long-term commitment, they tend to be rabid fans.

The famo.us thing is an interesting case because they opted to get their funding from investors. Upwards of $25 million later, it didn't pan out and guys like you are left looking for another solution. Ouch. GreenSock's model ties its funding mechanism directly to the market that it serves, so there's a wide base and it also ensures that if we're not providing solutions that the market cares about, it will naturally starve out the funding and hopefully keep us more responsive to what developers like you actually care about. We aren't beholden to a small set of outside investors looking for a return - we're beholden to our customers. In my [totally biased] opinion, that's safer for you and safer for us.

To the un-initiated, I completely understand why "free" CSS transitions or the latest MIT framework seems more appealing. But we hear over and over again from people who end up trying GSAP and quickly realize how much easier their jobs become and how many new possibilities are opened and they never want to go back. But it's very difficult to explain to the un-initiated. It's usually something they need to experience in a real-world project that has some demanding animations.

Sorry if that came off as a sales pitch - I didn't mean that at all. Keep in mind that GSAP is absolutely 100% free for even most commercial uses. There's only a tiny subset of commercial uses that require the special license.

Again, none of this is meant to imply that it's "bad" to use a different library or CSS or licensing model. GreenSock isn't for everyone. Maybe jsMorph is awesome for your use case. If so, great - use that.

Happy tweening!

thednp commented 8 years ago

I'm also stuck into using other than GSAP, again not because of licensing, but a personal choice to train myself, learn JS coding, so I developed my own little code that does exactly what I need (and not so many features as the mighty GSAP), also available here, with great performance and MIT licensed.

So far, very happy with the performance scores and experience as competing with GSAP is really really challenging. For me it seems to be one more step to dig into matching GSAP performance scores, and that is related to how it works with it's prototype model exporting itself to global scope, and never drop execution speed no matter how deep the function nesting goes... but I think I should stop here, I would have to probably focus on more practical coding.

He, 2 cents :)