-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathex.html
45 lines (41 loc) · 1.21 KB
/
ex.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TS Animate Example</title>
<style>
body {
margin: 0;
height: 100vh; /* Full viewport height */
display: flex;
justify-content: center; /* Center horizontally */
align-items: center; /* Center vertically */
background-color: #f0f0f0; /* Optional: Add a background color */
}
#ball {
width: 100px;
height: 100px;
background-color: blueviolet;
border-radius: 50%;
}
</style>
</head>
<body>
<div id="ball"></div>
<script type="module">
import TSAnimate from './dist/index.js'; // Import the TSAnimate class
const ball = document.getElementById('ball');
const animate = new TSAnimate(ball);
animate
.addAnimation('rotate', { duration: 1000 })
.addAnimation('flip', { duration: 1000 })
.addAnimation('bounce', { duration: 1000 })
.addAnimation('scale', { duration: 1000 })
//.addAnimation('fadeOut', { duration: 1000 })
//.addAnimation('fadeIn', { duration: 1000 })
.addAnimation('slide', { duration: 1000 })
.start();
</script>
</body>
</html>