Jump to content
Search Community

hgl

Members
  • Posts

    3
  • Joined

  • Last visited

hgl's Achievements

0

Reputation

  1. hgl

    How to reuse tweens?

    Thank you. I will apply this patten to my code base and see if it really works.
  2. hgl

    How to reuse tweens?

    OSUblake, thanks for the help. Unfortunately, in my case, the before and after elements can't be absolutely positioned. Inspired by your code, I give it another try, and this time I simply wrap tweens in functions, and return a new one whenever I need an animation, seems to be working. Not sure if I'm wasting memories? http://codepen.io/anon/pen/gpmzBm
  3. hgl

    How to reuse tweens?

    I'm experimenting with GSAP, and I have a few questions regarding the pen I created: How do I reuse tweens? In the demo, if I alternatively click toggle and yoyo (and clicking yoyo after the page is firstly loaded doesn't seem to work), the animation breaks easily. The two tweens I created actually cancel each other. Is it possible to define one as a reversed version of the other? Note that they have to modify a class. Thanks in advance.
×
×
  • Create New...