Jump to content
Search Community

scottyak

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by scottyak

  1. 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,
    }
    });
×
×
  • Create New...