<style>
/*Для темного первого блока*/
.uc-nav-dark,
.uc-nav-light {
position: fixed;
left: 0%;
width: 100%;
top: 0%;
display: block;
z-index: 100;
overflow: hidden;
visibility: hidden;
}
.uc-nav-dark .t396__artboard,
.uc-nav-light .t396__artboard {
position: fixed;
top: 0;
height: 100vh !important;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.3/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.3/ScrollTrigger.min.js"></script>
<script>
$(".uc-dark-section").each(function (index) {
let tl = gsap.timeline({
scrollTrigger: {
trigger: $(this),
start: "top bottom",
end: "top top",
scrub: true
}
});
tl.fromTo(
".uc-nav-dark .t396__artboard",
{
clipPath: "polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)"
},
{
clipPath: "polygon(0% 0%, 100% 0%, 100% 0%, 0% 0%)",
ease: "none"
}
);
tl.fromTo(
".uc-nav-light .t396__artboard",
{
clipPath: "polygon(0% 100%, 100% 100%, 100% 100%, 0% 100%)"
},
{
clipPath: "polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)",
ease: "none"
},
0
);
let tl2 = gsap.timeline({
scrollTrigger: {
trigger: $(this),
start: "bottom bottom",
end: "bottom top",
scrub: true
}
});
tl2.fromTo(
".uc-nav-light .t396__artboard",
{
clipPath: "polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)"
},
{
clipPath: "polygon(0% 0%, 100% 0%, 100% 0%, 0% 0%)",
ease: "none"
}
);
tl2.fromTo(
".uc-nav-dark .t396__artboard",
{
clipPath: "polygon(0% 100%, 100% 100%, 100% 100%, 0% 100%)"
},
{
clipPath: "polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)",
ease: "none"
},
0
);
});
</script>
<style>
/*Для светлого первого блока*/
.uc-nav-dark,
.uc-nav-light {
position: fixed;
left: 0%;
width: 100%;
top: 0%;
display: block;
z-index: 100;
overflow: hidden;
visibility: hidden;
}
.uc-nav-dark .t396__artboard,
.uc-nav-light .t396__artboard {
position: fixed;
top: 0;
height: 100vh !important;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.3/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.3/ScrollTrigger.min.js"></script>
<script>
$(".uc-light-section").each(function (index) {
let tl = gsap.timeline({
scrollTrigger: {
trigger: $(this),
start: "top bottom",
end: "top top",
scrub: true
}
});
tl.fromTo(
".uc-nav-light .t396__artboard",
{
clipPath: "polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)"
},
{
clipPath: "polygon(0% 0%, 100% 0%, 100% 0%, 0% 0%)",
ease: "none"
}
);
tl.fromTo(
".uc-nav-dark .t396__artboard",
{
clipPath: "polygon(0% 100%, 100% 100%, 100% 100%, 0% 100%)"
},
{
clipPath: "polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)",
ease: "none"
},
0
);
let tl2 = gsap.timeline({
scrollTrigger: {
trigger: $(this),
start: "bottom bottom",
end: "bottom top",
scrub: true
}
});
tl2.fromTo(
".uc-nav-dark .t396__artboard",
{
clipPath: "polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)"
},
{
clipPath: "polygon(0% 0%, 100% 0%, 100% 0%, 0% 0%)",
ease: "none"
}
);
tl2.fromTo(
".uc-nav-light .t396__artboard",
{
clipPath: "polygon(0% 100%, 100% 100%, 100% 100%, 0% 100%)"
},
{
clipPath: "polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)",
ease: "none"
},
0
);
});
</script>