-
Notifications
You must be signed in to change notification settings - Fork 34
/
welcome.js
68 lines (63 loc) · 1.13 KB
/
welcome.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
document.addEventListener('DOMContentLoaded', () => {
//Wrapper animation
anime.timeline({
targets: ".welcome",
easing: "easeOutExpo",
})
.add({
width: ["0vw", "100vw"],
opacity: 1,
duration: 1200,
})
.add({
delay: 2700,
translateX: "100vw",
duration: 1500,
complete: function(anime) {
document.querySelector('.welcome').remove();
}
})
//Text animation
anime({
targets: ".heading",
delay: 400,
opacity: 1,
duration: 1800,
translateY: ["-30px", "0px"],
easing: "easeOutExpo",
});
//Text-sm animation
anime({
targets: ".sub-heading",
delay: 600,
opacity: 1,
duration: 1800,
translateY: ["-30px", "0px"],
easing: "easeOutExpo",
});
//Loader animation
anime({
targets: ".loader",
delay: 2000,
duration: 2300,
width: ["0", "100%"],
easing: "easeOutExpo",
});
//Loader-wrapper animation
anime({
targets: ".loader-wrapper",
delay: 1500,
duration: 1800,
opacity: 1,
easing: "easeOutExpo",
});
})
//Paragraphs
anime({
targets: 'p',
opacity: 1,
duration: 1800,
translateY: ["-30px", "0px"],
easing: "easeOutExpo",
delay: (el, i) => 5200 + 100 * i,
})