I have one more question.
How can I make the block decrease at the end work the same way as the increase at the start. I mean is that the decrease at the end starts before the dashed line disappears and the parallax ends. At the moment, the decrease at the end begins only after the end of the parallax and the hiding of the line. https://codepen.io/glem1337/pen/bGeGLWY
I found a solution, but I'm not sure it is correct.
tween
.to(
".scroll-slider",
{
clipPath: "inset(10% 5%)",
duration: 1
},
"start"
)
.to(
".scroll-progress-line",
{
y: "-100%",
duration: 4
},
"start"
)
.to(
".scroll-slider-item img",
{
y: "-20%",
duration: 4
},
"start"
)
.to(
".scroll-slider",
{
clipPath: "inset(20% 10%)",
duration: 1
},
"-=1" // this solution
);
Also I would like to know if it seems to me that the animation at the end is slower? And how to solve it.