I'm learning about GSAP and I can see its usefulness, but I'm a little confused about this specific issue. I found a codepen that helps illustrate what I'm trying to do, but doesn't completely address the solution.
I need to be able to start and stop an infinite rotating animation from wherever it left off (which is what this codepen does), but with a catch: when I pause the animation, I want it to spin a couple more times and smoothly end at `rotation: "0"`, rather than a random rotation value.
I am blanking on how to do this... any help would be very much appreciated. Thank you!
Infinite rotation to pause at rotation: "0" or other custom value, after several spins
in GSAP
Posted
Hey all,
I'm learning about GSAP and I can see its usefulness, but I'm a little confused about this specific issue. I found a codepen that helps illustrate what I'm trying to do, but doesn't completely address the solution.
I need to be able to start and stop an infinite rotating animation from wherever it left off (which is what this codepen does), but with a catch: when I pause the animation, I want it to spin a couple more times and smoothly end at `rotation: "0"`, rather than a random rotation value.
I am blanking on how to do this... any help would be very much appreciated. Thank you!
See the Pen GpXGMd by MAW (@MAW) on CodePen