forked from lvivski/animatic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbounce.html
47 lines (46 loc) · 1.04 KB
/
bounce.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Matrix</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<style>
.block {
border-radius: 50%;
}
</style>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<div class="block"></div>
</body>
<script src="../anima.js"></script>
<script>
var world = anima.js(),
item = world.add(document.querySelector('.block'))
item
.animate({
translate: [0, 300, 0]
}, 500, 'ease-in-quad')
.animate({
translate: [0, -200, 0]
}, 450, 'ease-out-quad')
.animate({
translate: [0, 200, 0]
}, 400, 'ease-in-quad')
.animate({
translate: [0, -100, 0]
}, 350, 'ease-out-quad')
.animate({
translate: [0, 100, 0]
}, 300, 'ease-in-quad')
.animate({
translate: [0, -50, 0]
}, 200, 'ease-out-quad')
.animate({
translate: [0, 50, 0]
}, 150, 'ease-in-quad')
</script>
</html>