forked from Okazari/Rythm.js
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
212 lines (212 loc) · 6 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Rythm.js</title>
<link rel="stylesheet" href="./demo/rythm.css" media="screen" title="no title" charset="utf-8">
</head>
<body>
<!-- <audio id="audio" src="samples/rythmC" autoplay=""></audio> -->
<div class="container">
<h1 class="shake3">
Rythm.js - v2.1.0
</h1>
<h2>
A javascript library that makes your page dance.
</h2>
<div id='player'>
<button id='start'>Start Demo</button>
<button id='stop'>Stop Demo</button>
<button id='mic'>Use Microphone</button>
</div>
<div>
<a class="twist3" href="https://github.com/Okazari/Rythm.js">View on github</a>
<a class="twist1" href="https://github.com/Okazari/Rythm.js/releases">Release notes</a>
</div>
<section>
<h1>
Basic
</h1>
<div class="demo">
<div class="rythm rythm-bass">♫</div>
<pre class="prettyprint">
use css class 'rythm-bass'
</pre>
</div>
<div class="demo">
<div class="rythm rythm-medium">♫</div>
<pre class="prettyprint">
use css class 'rythm-medium'
</pre>
</div>
<div class="demo">
<div class="rythm rythm-high">♫</div>
<pre class="prettyprint">
use css class 'rythm-high'
</pre>
</div>
</section>
<section>
<h1>
Pulse
</h1>
<div class="demo">
<div class="rythm pulse1">♫</div>
<pre class="prettyprint">
rythm.addRythm('pulse1', 'pulse', 0, 10)
</pre>
</div>
<div class="demo">
<div class="rythm pulse2">♫</div>
<pre class="prettyprint">
rythm.addRythm('pulse2', 'pulse', 0, 10, {
min: 0.1,
max: 1
})
</pre>
</div>
<div class="demo">
<div class="rythm pulse3">♫</div>
<pre class="prettyprint">
rythm.addRythm('pulse3', 'pulse', 0, 10, {
min: 1,
max: 1.75
})
</pre>
</div>
</section>
<section>
<h1>
Jump
</h1>
<div class="demo">
<div class="rythm jump1">♫</div>
<pre class="prettyprint">
rythm.addRythm('jump1', 'jump', 0, 10)
</pre>
</div>
<div class="demo">
<div class="rythm jump2">♫</div>
<pre class="prettyprint">
rythm.addRythm('jump2', 'jump', 150, 40, {
min: -20,
max: 20
})
</pre>
</div>
</section>
<section>
<h1>
Shake
</h1>
<div class="demo">
<div class="rythm shake1">♫</div>
<pre class="prettyprint">
rythm.addRythm('shake1', 'shake', 0, 10)
</pre>
</div>
<div class="demo">
<div class="rythm shake2">♫</div>
<pre class="prettyprint">
rythm.addRythm('shake2', 'shake', 150, 40, {
min: 0,
max: 20
})
</pre>
</div>
<div class="demo">
<div class="rythm shake3">♫</div>
<pre class="prettyprint">
rythm.addRythm('shake3', 'shake', 0, 10, {
direction: 'left'
})
</pre>
</div>
</section>
<section>
<h1>
Twist
</h1>
<div class="demo">
<div class="rythm twist1">♫</div>
<pre class="prettyprint">
rythm.addRythm('twist1', 'twist', 0, 10)
</pre>
</div>
<div class="demo">
<div class="rythm twist2">♫</div>
<pre class="prettyprint">
rythm.addRythm('twist2', 'twist', 0, 10, {
min: 20,
max: 180
})
</pre>
</div>
<div class="demo">
<div class="rythm twist3">♫</div>
<pre class="prettyprint">
rythm.addRythm('twist3', 'twist', 0, 10, {
direction: 'left'
})
</pre>
</div>
</section>
<section>
<h1>
Vanish
</h1>
<div class="demo">
<div class="rythm vanish vanish1">♫</div>
<pre class="prettyprint">
rythm.addRythm('vanish1', 'vanish', 0, 10)
</pre>
</div>
<div class="demo">
<div class="rythm vanish vanish2">♫</div>
<pre class="prettyprint">
rythm.addRythm('vanish2', 'vanish', 0, 10, {
reverse: true
})
</pre>
</div>
</section>
<section>
<h1>
Background-Color
</h1>
<div class="demo">
<div class="rythm color1"></div>
<pre class="prettyprint">
rythm.addRythm('color1', 'color', 0, 10)
</pre>
</div>
<div class="demo">
<div class="rythm color2"></div>
<pre class="prettyprint">
rythm.addRythm('color2', 'color', 0, 10, {
from: [0,0,255],
to:[255,0,255]
})
</pre>
</div>
<div class="demo">
<div class="rythm color3"></div>
<pre class="prettyprint">
rythm.addRythm('color3', 'color', 0, 10, {
from: [255,255,0],
to:[255,0,0]
})</pre>
</div>
</section>
<div id='playerBottom'>
<button id='startBottom'>Start Demo</button>
<button id='stopBottom'>Stop Demo</button>
<button id='micBottom'>Use Microphone</button>
</div>
<div>
</div>
<script type="text/javascript" src="./rythm.js"></script>
<script type="text/javascript" src="./demo/exemple.js"></script>
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
</body>
</html>