Jump to content
Search Community

anir

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by anir

  1. const animation = gsap.to(node, {
          x: width,
          scrollTrigger: {
            trigger: '#our_clients_section',
            start: 'center bottom',
            end: 'bottom top',
            scrub: 3,
            onUpdate: (self) => {
              distanceTrainCrossed = parseInt(self.animation?._targets[0]._gsap.x)
            }
          }
        })

    I need the distanceTrainCrossed sync with train object latest position, but as there is scrub enabled of 3s. During the scrub, the onUpdate function not firing. so i can't get the latest position.

×
×
  • Create New...