Hey Greensock Community ?,
So I have trying to make a animation based on scroll using ScrollTrigger.
The desired animation is:
On the scroll the section with class `layers_section` pins to the screen.
On Further scroll the element with class `first_layer` scales from 0.5 to 1.01.
then the element with class `second_layer`, `left_info` and `left_card` translates from y=100 to y=0 but the issue is as I am using a single timeline with single section pinned while creating the timeline object and defining scrollTrigger object inside it I am unable to access callbacks like `onEnterBack`, `onLeave` and I need these utitlities to continue.
Is there any way I can get those callbacks.
Adding the code where I created the timeline object as well as the codepen link too.
Looking forward for the solution to the problem.
const worksTimeline = gsap.timeline({
scrollTrigger: {
trigger: ".layers_section",
markers: true,
start: "top top",
end: "+=6000px",
scrub: true,
pin: true,
},
});