-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
95 lines (90 loc) · 1.41 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
let tl = gsap.timeline({
scrollTrigger: {
trigger: ".part-2",
start: "0% 50%",
end: "50% 50%",
// markers: true,
// scrub: 1,
},
});
tl.to("#imgthree",
{
bottom: "-5vh",
})
.to("#imgtwo, #imgfour",
{
bottom: "-10vh",
})
.to("#imgone, #imgfive",
{
bottom: "-20vh",
});
let tl2 = gsap.timeline({
scrollTrigger: {
trigger: "#part-5",
start: "50% 50%",
end: "150% 50%",
pin: true,
scrub: 2,
},
});
tl2.to("#scroll-1",
{
bottom: "60vh",
})
.to("#scroll-1",
{
opacity: 0,
})
.to("#scroll-2",
{
opacity: 1,
}, 'asd')
.to(".phone-img",
{
x: "-30%",
}, 'asd')
.to("#scroll-2",
{
bottom: "60vh",
})
.to("#scroll-2",
{
opacity: 0,
})
.to("#scroll-3",
{
opacity: 1,
}, 'zxc')
.to(".phone-img",
{
x: "-59%",
}, 'zxc')
.to("#scroll-3",
{
bottom: "60vh",
})
.to("#scroll-3",
{
opacity: 0,
})
.to("#scroll-4",
{
opacity: 1,
}, 'jkl')
.to(".phone-img",
{
x: "-88%",
}, 'jkl')
var swiper = new Swiper(".mySwiper", {
spaceBetween: 30,
centeredSlides: true,
autoplay: {
delay: 2000,
disableOnInteraction: false,
},
pagination: {
el: ".swiper-pagination",
clickable: true,
},
});