Jump to content


  • Posts

  • Joined

  • Last visited


0 Newbie
  1. Hi, while developing a responsive GSAP animation, I came across these problems. Please refer to the codepen link for my code. * when resetting the timeline to 0, why aren't the elements properly reset to their initial position? (line 28 in js) * after the first red box has tweened, the timeline will pause until the green box is clicked. However why is the extra delay needed for the second callback to not execute when resizing the browser at that time? (line 38 in js). The only thing I can think of is that a function does not add any duration to the timeline, resulting in multiple subsequent added callbacks to be executed at the exact same time in the timeline (which makes kind of sense..), am I correct?
  2. When adding a tween with a negative offset, but with a duration that does not exceed the previous tween, things start to behave weird when restarting the timeline. I created a small codepen example to demonstrate this. It seems like the first tween does not get overwritten by the second tween but only after the first tween finished for the first time. [edit] using relative ("+=100") or absolute (100) values does not make any difference [edit2] using tl.reverse(); instead of tl.restart() breaks the animation entirely