forked from akzhy/Vara
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
58 lines (58 loc) · 1.27 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>Vara.js</title>
<style>
* {
margin: 0;
padding: 0;
}
#container {
width: 60%;
margin: 20px auto;
}
</style>
</head>
<body>
<div id="container"></div>
<script src="./lib/vara.min.js" type="text/javascript"></script>
<script>
var vara = new Vara(
"#container",
"./fonts/Satisfy/SatisfySL.json",
[
{
text: "Vara.js",
textAlign: "center",
strokeWidth: 2.5,
y: 80,
duration: 1500,
},
{
text: "A red flare silhouetted the jagged edge of a wing.",
width: 500,
strokeWidth: 2.5,
y: 40,
x: 80,
duration: 4000,
},
{
text: "Sphinx of black quartz, judge my vow.",
strokeWidth: 2,
color: "blue",
id: "sphinx",
autoAnimation: false,
x: 80,
duration: 4500,
},
],
{
fontSize: 46,
}
);
vara.ready(function () {
vara.draw("sphinx");
});
</script>
</body>
</html>