Skadi2k3
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by Skadi2k3
-
-
Hey, thanks for making ScrollTrigger!
One of the demos on the ScrollTrigger documentation page had different scrub values. Since I can't update the scrub value directly I was trying to replace the entire active ScrollTrigger, but that applied a tween of the start state till the current ScrollTrigger position on update. Is there a sensible way to replace the active ScrollTrigger with another one, without tweening from the start? I can see that there is a certain complexity to that, especially when you have a timeline hooked up.
The tweens of the killed ScrollTrigger instance should keep their state and scrub to the state of the next ScrollTrigger instance with the new scrub value :-)
Animation of the pen should be: scrolling down -> lower discs move first and upper disc drag behind, scrolling up -> upper discs move first and lower discs drag behind.
Replace active ScrollTrigger
in GSAP
Posted
Thanks Zach. I used the onUpdate method and tweens per tick with overwrite. I initially used the same values for duration that I had used for the scrub, which should then theoretically take the same amount of time (without a performance drawback and infinite ticks per second). I had to change the values a bit because it got a bit slower after all, i think. But maybe that's just subjective because of the blinking before.
See the Pen RwrjqWP?editors=0010 by Skadi2k3 (@Skadi2k3) on CodePen