Hey there,
I have a ScrollTrigger animation with fixed start & end values
const tween = gsap.fromTo(el, {
background: 'red'
}, {
scrollTrigger: {
scrub: true,
start: 0,
end: 500
},
background: 'blue',
ease: 'none'
});
How can I update the end value on my side? Let's say after after the user opens a modal I need to update the end value to 100.
tween.scrollTrigger.end = 100; doesn't work as it is a read-only value.
I
Hey there,
I have a ScrollTrigger animation with fixed start & end values
const tween = gsap.fromTo(el, {
background: 'red'
}, {
scrollTrigger: {
scrub: true,
start: 0,
end: 500
},
background: 'blue',
ease: 'none'
});
How can I update the end value on my side? Let's say after after the user opens a modal I need to update the end value to 100.
tween.scrollTrigger.end = 100; doesn't work as it is a read-only value.
I