AduITC Posted January 18, 2021 Share Posted January 18, 2021 Good morning everyone! I'm very sorry to bother you with a trivial question, but I'm totally new to this amazing tool that is GSAP and I'm still struggling to understand its syntax and logic, as I'm not an experienced dev. I really want to learn this wonderful library as it seems very powerful, but for now I'm stuck on small basic things. I have created the following animation in CSS: https://codepen.io/AduITSU/pen/BaLMLYO Please, ignore the 4s pause between each repeat: it shouldn't be there in the final concept. As you can see, each object-pair gradually changes color to light blue in 1s and then reverts back to its original fill in 1s before the following object-pair does the same thing and so forth. I've tried to replicate this in GSAP... here's the miserable result: https://codepen.io/AduITSU/pen/vYXbXWW I suppose I must place the "stagger" object somewhere else but I can't figure out where. Plus, I don't know which GSAP easing is the most similar to the CSS normal "ease". Could you please help me guys?? Thank you very much for your patience and kindness! See the Pen BaLMLYO by AduITSU (@AduITSU) on CodePen Link to comment Share on other sites More sharing options...
Solution Carl Posted January 18, 2021 Solution Share Posted January 18, 2021 Hi AdulTSU, This is an interesting challenge and not too tricky with GSAP, but it does require knowing some of the finer nuances of the API. Please see this video on placing repeat in the stagger object vs placing it on a timeline or tween I was able to get what you want pretty close I think with this approach See the Pen BaLMJYP?editors=0010 by snorkltv (@snorkltv) on CodePen The blog post below contains a lesson from my course GSAP3 Beyond the Basics which shows how to get rid of any pause between repeats https://www.snorkl.tv/greensock-staggers-with-seamless-loops/ Hopefully this helps point you in the right direction 5 Link to comment Share on other sites More sharing options...
AduITC Posted January 18, 2021 Author Share Posted January 18, 2021 Thank you very much, Carl! This is exactly what I was looking for! I really appreciate your help and the resources you pointed me to. I will study them carefully in order to enhance my very poor "mastery" of GSAP! Thanks again for your kindness! 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now