Jump to content
Search Community

Wilson Kamau

Premium
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Wilson Kamau

  1. This is exactly what I was looking for. Thank you!
  2. Hello, I am struggling to create a custom stagger that retains the onComplete functionality built into the the OG stagger property. How do I designate a function to run after each custom stagger? I didn't know whether this question required a codepen demo or not so I threw something together anyway. Is there a way to configure each custom stagger with an onComplete function? Let me know if clarification is needed. Thanks GSAP team!
  3. Hello, I am having trouble getting the onLeave Callback to work properly in my Flip animations. I have tried setting absolute to true, not setting absolute to true, using the absoluteOnLeave Callback, all to no avail. If I understand correctly, the onLeave callback is supposed to allow developers to animate leaving objects gracefully, as opposed to the objects disappearing abruptly. I would like the squares to fade and rotate as they are being removed from the document. After running the codepen program, you have to comment out the removeSquares() function at the bottom of the js file to reset the squares. I have a feeling that I've completely overlooked a piece of this process, that's why I've turned to the community's experienced GSAP devs. Any suggestions are much appreciated!
  4. Hello, What is the best way to add Flip animations to a timeline? So I understand that Flip.from() returns a gsap timeline object that you can then add() to other timelines. The issue I'm facing is that in order to return the timeline I would have to call the function. When the function is invoked in the add() parameter , (e.g. t1.add(function()), Flip.getState() and everything else in the function being called will run prematurely. I don't want Flip.getState() and all the other code to run until the flip timeline is next up in the master timeline. Additionally, timeline.call will wait to call the function, but it will simply run the function, instead of call the function and insert the returned flip timeline into the master timeline which is the desired behavior. The code pen I've attached should do a better job of illustrating my issue. Notice how flipSquaresRow and flipSquaresColumn animations are running at the same time, even though the position parameters in masterTL() are telling them to run sequentially. The problem is the both ">" previous animation pointers are pointing back to the first tween because the timeline considers the other two just plain old functions and not animations, even though they're performing animations. Thanks everyone. Let me know if you need clarification on my question.
×
×
  • Create New...