Hi there,
I am trying to achieve a scroll trigger on scale after already using scale in a fromTo statment. There seems to be an issue with doing this, or maybe I am misunderstanding how to use GSAP which is probably the case.
I also cannot start the scrollTrigger scale at 1.0... it has to be 1.2 and I don't know why.
If someone could please take the time to help me out that would be fantastic!
const section1Animations = gsap.timeline();
section1Animations
.fromTo(mainText, {
opacity: 0,
scale: 0.5,
}, {
scale: 1.0,
opacity: 1.0,
duration: 1
})
.fromTo(downArrow, {
opacity: 0,
y: 100
}, {
opacity: 1,
y: 0,
duration: 1
})
//To animate the scale after the above timeline fires.
gsap.to(mainText, {
scrollTrigger: {
trigger: section1,
start: "top bottom",
end: "bottom top",
scrub: 1
},
scale: 1.2,
transformOrigin: "bottom",
})