-
Notifications
You must be signed in to change notification settings - Fork 249
/
index.html
523 lines (523 loc) · 15.7 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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
<!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>
<div class="container">
<h1 class="shake3">
Rythm.js - v2.2.6
</h1>
<h2>
A javascript library that makes your page dance.
</h2>
<div id="quote">
<div class="quote-title">Random quote about Rythm.js</div>
<div id="quote-text">
</div>
<div id="quote-author">
</div>
</div>
<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>
<h1>
Basic usage
</h1>
<section>
<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>
<h1>
Added in v2.2.5
</h1>
<section>
<h3>
Tilt
</h3>
<div class="demo">
<div class="rythm tilt1">♫</div>
<pre class="prettyprint">
rythm.addRythm('tilt1', 'tilt', 0, 10)
</pre>
</div>
<div class="demo">
<div class="rythm tilt2">♫</div>
<pre class="prettyprint">
rythm.addRythm('tilt2', 'tilt', 0, 10, {
reverse : true
})
</pre>
</div>
</section>
<section>
<h3>
Font-color
</h3>
<div class="demo">
<div class="rythm font fontColor1">
<div class="font__placeholder"></div>Font-color !
</div>
<pre class="prettyprint">
rythm.addRythm('fontColor1', 'color', 0, 10)
</pre>
</div>
<div class="demo">
<div class="rythm font fontColor2">
<div class="font__placeholder"></div>Font-color !
</div>
<pre class="prettyprint">
rythm.addRythm('fontColor2', 'color', 0, 10, {
from: [0,0,255],
to:[255,0,255]
})
</pre>
</div>
</section>
<h1>
Added in v2.2.4
</h1>
<section>
<h3>
Font-size
</h3>
<div class="demo">
<div class="rythm font fontSize1">
<div class="font__placeholder"></div>Font-dance !
</div>
<pre class="prettyprint">
rythm.addRythm('fontSize1', 'fontSize', 0, 2)
</pre>
</div>
<div class="demo">
<div class="rythm font fontSize2">
<div class="font__placeholder"></div>Font-dance !
</div>
<pre class="prettyprint">
rythm.addRythm('fontSize', 'fontSize', 0, 2, {
min: 0.5,
max: 2
})
</pre>
</div>
</section>
<h1>
Added in v2.2.3
</h1>
<section>
<h3>
Border-Width
</h3>
<div class="demo">
<div class="rythm">
<div class="borderWidth1"></div>
</div>
<pre class="prettyprint">
rythm.addRythm('borderWidth1', 'borderWidth', 0, 2)
</pre>
</div>
<div class="demo">
<div class="rythm">
<div class="borderWidth2"></div>
</div>
<pre class="prettyprint">
rythm.addRythm('borderWidth2', 'borderWidth', 0, 2, {
min: 2,
max: 10
})
</pre>
</div>
</section>
<h1>
Added in v2.2.2
</h1>
<section>
<h3>
Neon
</h3>
<div class="demo">
<div class="rythm neon1"></div>
<pre class="prettyprint">
rythm.addRythm('neon1', 'neon', 0, 10)
</pre>
</div>
<div class="demo">
<div class="rythm neon2"></div>
<pre class="prettyprint">
rythm.addRythm('neon2', 'neon', 0, 10, {
from: [0,0,255],
to:[255,0,255]
})
</pre>
</div>
<div class="demo">
<div class="rythm neon3"></div>
<pre class="prettyprint">
rythm.addRythm('neon3', 'neon', 0, 10, {
from: [255,255,0],
to:[255,0,0]
})</pre>
</div>
</section>
<section>
<h3>
Border-Color
</h3>
<div class="demo">
<div class="rythm borderColor1"></div>
<pre class="prettyprint">
rythm.addRythm('borderColor1', 'borderColor', 0, 10)
</pre>
</div>
<div class="demo">
<div class="rythm borderColor2"></div>
<pre class="prettyprint">
rythm.addRythm('borderColor2', 'borderColor', 0, 10, {
from: [0,0,255],
to:[255,0,255]
})
</pre>
</div>
<div class="demo">
<div class="rythm borderColor3"></div>
<pre class="prettyprint">
rythm.addRythm('borderColor3', 'color', 0, 10, {
from: [255,255,0],
to:[255,0,0]
})
</pre>
</div>
</section>
<section>
<h3>
Kern
</h3>
<div class="demo">
<div class="rythm font kern1">𐇑🕪 rythm.js</div>
<pre class="prettyprint">
rythm.addRythm('kern1', 'kern', 0, 10 , {
min: -5,
max: 5
})
</pre>
</div>
<div class="demo">
<div class="rythm font kern2">𐇑🕪 rythm.js</div>
<pre class="prettyprint">
rythm.addRythm('kern2', 'kern', 0, 10 , {
min: -5,
max: 5,
reverse: true,
})
</pre>
</div>
</section>
<h1>
Added in v2.2.1
</h1>
<section>
<h3>
Blur
</h3>
<div class="demo">
<div class="rythm blur1">♫</div>
<pre class="prettyprint">
rythm.addRythm('blur1', 'blur', 0, 10)
</pre>
</div>
<div class="demo">
<div class="rythm blur2">♫</div>
<pre class="prettyprint">
rythm.addRythm('blur2', 'blur', 0, 10, {
reverse: true
})
</pre>
</div>
<div class="demo">
<div class="rythm blur3">♫</div>
<pre class="prettyprint">
rythm.addRythm('blur3', 'blur', 0, 10, {
max: 16
})</pre>
</div>
</section>
<section>
<h3>
Swing
</h3>
<div class="demo">
<div class="rythm swing1">♫</div>
<pre class="prettyprint">
rythm.addRythm('swing1', 'swing', 0, 10)
</pre>
</div>
<div class="demo">
<div class="rythm swing2">♫</div>
<pre class="prettyprint">
rythm.addRythm('swing2', 'swing', 0, 10, {
curve: 'up',
})
</pre>
</div>
<div class="demo">
<div class="rythm swing3">♫</div>
<pre class="prettyprint">
rythm.addRythm('swing3', 'swing', 0, 10, {
direction: 'left',
})
</pre>
</div>
<div class="demo">
<div class="rythm swing4">♫</div>
<pre class="prettyprint">
rythm.addRythm('swing4', 'swing', 0, 10, {
radius: 10,
})
</pre>
</div>
</section>
<h1>
Added in v2.2.0
</h1>
<section>
<h3>Border-Radius</h3>
<div class="demo">
<div class="rythm radius1"></div>
<pre class="prettyprint">
rythm.addRythm('radius1', 'radius', 0, 10, {
min: 0,
max: 30
})
</pre>
</div>
<div class="demo">
<div class="rythm radius2"></div>
<pre class="prettyprint">
rythm.addRythm('radius1', 'radius', 0, 10, {
reverse: true,
min: 0,
max: 30
})
</pre>
</div>
</section>
<h1>
Added in v2.0.0
</h1>
<section>
<h3>
Pulse
</h3>
<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>
<h3>
Jump
</h3>
<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>
<h3>
Shake
</h3>
<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>
<h3>
Twist
</h3>
<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>
<h3>
Vanish
</h3>
<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>
<h3>
Background-Color
</h3>
<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 id="shout" class="shout">
</div>
</div>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/scrollingelement@1.5.2/scrollingelement.min.js"></script>
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
<script type="text/javascript">
const quotes = [
{ text: "I hope you're collecting what people song into the microphone. My wife just laid down a pretty sweet riff.", author: "jk3us" },
{ text: "I think there's a bug, it also makes me dance.", author: "moogeekfull-stack" },
{ text: "Where was this when I was making Geocities pages!?", author: "shabibbles" },
{ text: "It's fun for a demo. But if I ever find it used on a web page I visit, I shall track the owner down and place them in isolation for life.", author: "crispinb" },
{ text: "Jesus christ it's 1994 again", author: "WeaponizedMath" },
{ text: "I don't know what it is but I like it!!!", author: "blairanderson" },
{ text: "Turned on microphone, started finger drumming on laptop. This was more fun than I expected it to be.", author: "harel" },
{ text: "This will be everywhere on April Fools 2018.", author: "prawn" },
{ text: "Why.js", author: "Robby517" },
{ text: "Blink tag 2: godzilla strikes back", author: "@erez" },
{ text: "<Marque> tag back with vengeance", author: "@udayms" },
{ text: "I. need. this. On. all. my. websites.", author: "@Lordmau5" },
{ text: "With great power comes great responsibility. Or just obnoxious fun.", author: "@TheMeteorChef" },
{ text: "I both recognize the obnoxiousness of this AND want to use it everywhere", author: "@ekmpls" },
{ text: "lolwat.js", author: "@psychronautron" },
{ text: "At this point, we're coming full circle back to my 1997 AngelFire site on Ultima Online... I'm OK with it.", author: "@ryanpoe85" },
{ text: "<blink> tag on steroids!", author: "@master_mitch" },
{ text: "This is why I love internet", author: "@builtbymiken" },
{ text: "Played around with[...]. accidentally created a nightmare", author: "@becckitt" },
]
const quote = quotes[Math.floor(Math.random() * quotes.length)]
document.getElementById('quote-author').innerText = quote.author
document.getElementById('quote-text').innerText = quote.text
</script>
<script type="text/javascript" src="./rythm.js"></script>
<script type="text/javascript" src="./demo/example.js"></script>
</body>
</html>