Hey,
I'm looking for an easy way to update variables used in a tween. Take this example, where the duration is a variable that has to update when the window is resized. To avoid creating a new resize eventlistener, I'm looking for a way to update this variable using the integrated listener from GSAP.
let time = myFunction();
timeline.current.to(myRef.current, {
scaleY: 2,
duration: time[0],
}, 0)
In this example, using variables and functions inside a scrollTrigger, it will auto