scottyak
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by scottyak
-
-
-
I'd like to use the progress from a ScrollTrigger instance to update the value for a tween (in this case, pushing a title element down within a pinned element). I tried the below, I can get the progress un on Update, but I'm not sure how to apply it to the tween:
let el = document.querySelector(".section-title");gsap.to(el, {y: () => self.progress * (window.innerHeight * 3),ease: 'none',scrollTrigger: {trigger: ".col-left",start: "top top",end: "bottom bottom",onUpdate: (self) => console.log(self.progress),scrub: true,}});
Use ScrollTrigger Progress in Tween
in GSAP
Posted
Yes, that's perfect, thanks! I figured that would add pin spacing under the element and make the section longer than I wanted, but I guess not.
Thanks again!