-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathscene.html
63 lines (53 loc) · 946 Bytes
/
scene.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Test: Scene</title>
<style>
.square{
position: absolute;
display: inline-block;
top:0;
left:0;
width: auto;
height: auto;
vertical-align: text-bottom;
background-color: #000;
padding: 20px;
margin-bottom: 5%;
}
</style>
</head>
<body>
<div id="square_1" class="square"></div><br>
<script type="text/javascript" src="../fat.js"></script>
<script>
const scene_1 = Fat.create();
const scene_2 = Fat.create();
scene_1.animate("#square_1", {
left: "50%"
},{
duration: 2000,
callback: function(){
scene_1.animate(this, {
left: 0
},{
duration: 2000
})
}
});
scene_2.animate("#square_1", {
top: "25%"
},{
duration: 2000,
callback: function(){
scene_2.animate(this, {
top: "50%"
},{
duration: 2000
})
}
});
</script>
</body>
</html>