greensock / GSAP

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

Can I chose animation strategy in tweenMax config? #260

Closed KoretskyiBohdan closed 6 years ago

KoretskyiBohdan commented 6 years ago

I just want to set TweenMax.to($element, 0.5, {x: 200}), but restrict to use CSS3 transition. Also sometimes I want to use only transitions or left/top instead transform. Can I set this in TweenMax config somehow?

jackdoyle commented 6 years ago

I'm a bit confused - you want to use GSAP (JavaScript-based engine) but you're limited to using CSS3 transitions and want GSAP to implement those for you? Perhaps I misunderstood.

Originally I wanted to build GSAP on top of CSS technology but it's simply impossible for a bunch of reasons. CSS has many limitations that make it ill-suited for a robust animation library. It could only accomplish a small subset of what GSAP can (and needs to) do.

So if I understood your question correctly, the answer would be "no" - you cannot have GSAP implement CSS3 transitions to accomplish your animations. It's a pure JS solution (which is a very good thing, trust me) :)

I'm curious: why would you be restricted to using only CSS transitions?