-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.js
More file actions
37 lines (35 loc) · 848 Bytes
/
Copy pathindex.js
File metadata and controls
37 lines (35 loc) · 848 Bytes
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
anime.timeline({loop: true})
.add({
targets: '.ml15 .word',
scale: [14, 1],
opacity: [0, 1],
easing: "easeOutCirc",
duration: 1000,
delay: (el, i) => 800 * i
}).add({
targets: '.ml15',
opacity: 0,
duration: 1000,
easing: "easeOutExpo",
delay: 5000
});
// Wrap every letter in a span
var textWrapper = document.querySelector('.ml12');
textWrapper.innerHTML = textWrapper.textContent.replace(/\S/g, "<span class='letter'>$&</span>");
anime.timeline({loop: true})
.add({
targets: '.ml12 .letter',
translateX: [40, 0],
translateZ: 0,
opacity: [0, 1],
easing: "easeOutExpo",
duration: 1000,
delay: (el, i) => 800 + 30 * i
}).add({
targets: '.ml12 .letter',
translateX: [0, -30],
opacity: [1, 0],
easing: "easeInExpo",
duration: 5000,
delay: (el, i) => 100 + 30 * i
});