-
Notifications
You must be signed in to change notification settings - Fork 168
/
index.html
91 lines (78 loc) · 1.73 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Siriwave</title>
<style>
body {
margin: 0;
background: #000;
color: #fff;
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
text-align: center;
}
a {
color: #fff;
}
#container,
#container-9 {
width: 600px;
height: 300px;
background-size: cover;
margin: 20px;
margin: 0 auto;
border: 1px dashed rgba(255, 255, 255, 0.4);
}
table {
width: 100%;
margin: 0 auto;
}
footer {
padding-top: 20px;
margin-top: 20px;
border-top: 1px solid rgba(255, 255, 255, 0.4);
}
</style>
<script src="dist/siriwave.umd.js"></script>
<script type="text/javascript" src="etc/dat.gui.js"></script>
</head>
<h1>SiriwaveJS</h1>
<p>The Apple® Siri wave-form<br />replicated in a JS library.</p>
<div id="background"></div>
<table>
<tr>
<td>
<h3>Classic</h3>
<div id="container"></div>
</td>
<td>
<h3>iOS9+</h3>
<div id="container-9"></div>
</td>
</tr>
</table>
<footer>
Installation guide and source code available
<a href="https://github.com/kopiro/siriwave">here</a>.
</footer>
<script>
var SW = new SiriWave({
container: document.getElementById("container"),
autostart: true,
});
var SW9 = new SiriWave({
style: "ios9",
container: document.getElementById("container-9"),
autostart: true,
});
window.onload = function () {
var gui = new dat.GUI();
gui.add(SW, "speed", 0, 1);
gui.add(SW, "amplitude", 0, 3);
gui.addColor(SW, "color");
var gui9 = new dat.GUI();
gui9.add(SW9, "speed", 0, 1);
gui9.add(SW9, "amplitude", 0, 3);
};
</script>
</html>