-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
88 lines (85 loc) · 1.96 KB
/
main.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
// Title Animation
var ml = { timelines: {}};
ml.timelines["ml5"] = anime.timeline({loop: false})
.add({
targets: '.ml5 .line',
opacity: [0.5,1],
scaleX: [0, 1],
easing: "easeInOutExpo",
duration: 700
}).add({
targets: '.ml5 .line',
duration: 600,
easing: "easeOutExpo",
translateY: function(e, i, l) {
var offset = -0.625 + 0.625*2*i;
return offset + "em";
}
}).add({
targets: '.ml5 .letters-left',
opacity: [0,1],
translateX: ["0.5em", 0],
easing: "easeOutExpo",
duration: 600,
offset: '-=300'
}).add({
targets: '.ml5 .letters-right',
opacity: [0,1],
translateX: ["-0.5em", 0],
easing: "easeOutExpo",
duration: 600,
offset: '-=600'
}).add({
targets: '.ml5 .letters-up',
opacity: [0,1],
translateY: ["-0.5em", 0],
easing: "easeOutExpo",
duration: 600,
offset: '-=600'
});
// Main sub topics animation
var ml2= {timelines: {}};
ml2.timelines["ml6"] = anime.timeline({loop: false})
.add({
targets: '.ml6 .line',
opacity: [0.5,1],
scaleX: [0, 1],
easing: "easeInOutExpo",
duration: 1000
}).add({
targets: '.ml6 .line',
duration: 1000,
easing: "easeOutExpo",
translateY: function(e, i, l) {
var offset = -0.625 + 0.625*2*i;
return offset + "em";
}
}).add({
targets: '.ml6 .letters-left1',
opacity: [0,1],
translateX: ["0.5em",0],
easing: "easeOutExpo",
duration: 1000,
offset: '+=100'
}).add({
targets: '.ml6 .letters-right1',
opacity: [0,1],
translateX: ["-0.5em", 0],
easing: "easeOutExpo",
duration: 1000,
offset: '-=1000'
}).add({
targets: '.ml6 .letters-down1',
opacity: [0,1],
translateY: ["0.5em", 0],
easing: "easeOutExpo",
duration: 1000,
offset: '-=1000'
}).add({
targets: '.ml6 .letters-up1',
opacity: [0,1],
translateY: ["-0.5em", 0],
easing: "easeOutExpo",
duration: 1000,
offset: '-=1000'
});