Hi guys
I have a trouble here
useEffect(()=>{
gsap.to([splidtext.current],{
scrollTrigger:{
trigger:[splidtext.current],
markers:true,
start:"top 90%",
end:'bottom 10%',
toggleActions:'restart null reverse null',
onUpdate:(self)=>console.log("update",self.progress.toFixed(3),splidtext.current.scrollWidth,splidtext.current.offsetWidth)
},
duration:10,
x:self.process*splidtext.current.offsetWidth //the problem is self.process is undefined
})
},[])
I can get the scrollTrigger progress value as you can see in onUpdate.
But how can i get self.process in x:blahblah so that i can use it to scoll.
Thanks a lot!!!