anir
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by anir
-
-
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.
Is there any way to run onUpdate function, during scrub?
in GSAP
Posted
Thank you for your explanation @mvaneijgen . And sorry for the inconvenience for the last explanation.