carhop__carhop-theme__DEV/resources/js/footer.js
2025-06-02 17:13:15 +02:00

79 lines
1.3 KiB
JavaScript

export default function initFooterShapes() {
gsap.fromTo(
'.shape.square',
{
y: '-60%',
rotation: 0,
},
{
scrollTrigger: {
trigger: '.branding',
start: 'top bottom',
end: 'bottom top',
markers: true,
scrub: 0.2,
},
y: '80%',
duration: 2,
ease: 'none',
}
);
gsap.fromTo(
'.shape.circle',
{
y: '-60%',
},
{
scrollTrigger: {
trigger: '.branding',
start: 'top bottom',
end: 'bottom top',
markers: true,
scrub: 0.4,
},
y: '30%',
duration: 2,
ease: 'none',
}
);
gsap.fromTo(
'.shape.rectangle-rotated',
{
y: '-60%',
},
{
scrollTrigger: {
trigger: '.branding',
start: 'top bottom',
end: 'bottom top',
markers: true,
scrub: 0.6,
},
y: '30%',
duration: 2,
ease: 'none',
}
);
gsap.fromTo(
'.shape.rectangle-vertical',
{
y: '-60%',
},
{
scrollTrigger: {
trigger: '.branding',
start: 'top bottom',
end: 'bottom top',
markers: true,
scrub: 0.3,
},
y: '60%',
duration: 2,
ease: 'none',
}
);
}