-
Notifications
You must be signed in to change notification settings - Fork 4
/
run.html
465 lines (400 loc) · 10.5 KB
/
run.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="author" content="Yannis Gravezas <[email protected]>">
<meta name="description" content="May the Boom be with you">
<!-- Mobile Stuff -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="msapplication-tap-highlight" content="no">
<!-- Chrome on Android -->
<meta name="mobile-web-app-capable" content="yes">
<meta name="application-name" content="Rayglider">
<link rel="icon" sizes="192x192" href="./favicon.png">
<!-- Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Rayglider">
<link rel="apple-touch-icon" href="./favicon.png">
<!-- Windows 8 -->
<meta name="msapplication-TileImage" content="./favicon.png">
<meta name="msapplication-TileColor" content="#FFFFFF">
<meta name="theme-color" content="#000000">
<link rel="icon" type="image/png" href="./favicon.png" />
<title>Rayglider</title>
<link href="https://fonts.googleapis.com/css?family=Roboto|Roboto+Mono" rel="stylesheet">
<link href='./lib/codemirror.css' rel='stylesheet' type='text/css'>
<style>
* {
margin:0;
padding:0;
}
body {
font-family:'Roboto';
overflow: hidden;
}
#header {
position:fixed;
z-index: 100;
padding-top:0.33vh;
font-family:'Roboto';
}
audio {
position: fixed;
bottom:0;
left: 0;
width:100%;
}
body, canvas {
width: 100%;
height: 100%;
}
canvas {
position: absolute;
top:0;
left:0;
}
#header #info {
padding-top: 0.8vh;
width: 100vw;
font-size: 0vh;
transition: opacity 0.2s, font-size 0.4s;
overflow: hidden;
opacity: 0;
color: white;
text-shadow: 0.1vh 0.2vh #666;
}
#header:hover #info {
font-size: 2.2vh;
opacity: 1;
}
#header .buttons {
transition: opacity 0.3s;
opacity: 0;
}
#header:hover .buttons {
opacity: 1;
}
#header #info a {
text-decoration: none;
color: #fff;
margin-left:0.2vw;
}
#header .buttons a {
text-shadow: 0.2vh 0.2vh black;
}
#header img {
vertical-align: middle;
}
#header span {
color: white;
font-weight:bold;
font-size: 2vh;
text-shadow: 0.2vh 0.2vh black;
vertical-align: middle;
}
button {
background-color: #FFF;
font-size: 2vh;
font-weight: bold;
color: black;
border-radius:0.66vh;
padding: 0.66vh;
margin-left:0.33vw;
cursor:pointer;
margin-top: 0.2vh;
font-family:'Roboto';
}
#export button {
margin-top: 1vh;
}
button.disabled {
background-color: #DDD;
color: #333;
opacity:0.66;
}
button:hover {
background-color: white;
color: black;
}
button:focus {
outline:0;
}
#audio {
position: fixed;
bottom:0;
left: 0;
width:100%;
z-index:1000;
}
#audio audio {
position:relative;
display: block;
}
#editor {
margin:0;
padding:0;
opacity:0;
transition: opacity 0.3s;
margin-top: 0.33vh;
z-index:10000;
}
#header:hover #editor, #header:hover #config {
opacity:1;
}
#editor > div {
position:relative;
background-color: rgba(0,0,0,0.1);
z-index: 0;
}
#header a {
text-decoration: none;
vertical-align: middle;
opacity: 0.96;
transition: opacity 0.1s;
text-shadow: 0.2vh 0.2vh #000;
margin-left: 1vw;
font-size: 2.2vh;
}
#info a {
opacity: 0.96;
}
#header a:hover {
text-shadow: 0.2vh 0.2vh #333;
opacity: 1.0;
}
#config {
opacity:0;
transition: opacity 0.2s;
margin-top:0.36vh;
color: #eee;
text-shadow: 0.06px 0.06px #666;
font-weight: bold;
font-size: 1.6vh;
font-family:'Roboto Mono', monospace;
}
#export {
position: fixed;
width: 100vw;
height: 79vh;
top: 9vh;
z-index: 10000;
visibility:hidden;
pointer-events: none;
}
body.code #export {
visibility:visible;
pointer-events:all;
}
body {
background-color: black;
}
span {
font-size: 1.66vh;
font-weight: bold;
}
select {
padding: 0.2vh;
border-radius: 0.2vh;
margin-left:0.2vh;
}
#logo {
border-radius: 0.66vh;
height: 2.3vh;
border: 0.66vh solid white;
margin-left: 0.33vh;
background-color: white;
padding-left: 0.2vh;
padding-right: 0.2vh;
padding-bottom: 0.4vh;
margin-top: -0.66vh;
}
.CodeMirror {
height: 79vh;
background-color: rgba(255, 255, 255, 0.94);
}
.CodeMirror span{
font-family: 'Roboto Mono', monospace;
}
#main, #side {
width: 49.8vw;
height: 100%;
margin: 0;
padding: 0;
display: inline-grid;
border-top: 0.66vh solid #f7f7f7;
border-bottom: 0.66vh solid #f7f7f7;
}
#side {
opacity: 0.96;
}
body.error #main, body.error #side{
border-top: 0.66vh solid #d00000;
border-bottom: 0.66vh solid #d00000;
}
#main {
float:left;
}
#side {
float:right;
}
body.split #main {
width:100vw;
}
body.split #side {
display: none;
}
#foot {
position: absolute;
bottom: -6.4vh;
font-family:'Roboto';
}
#foot div {
width: 33vw;
display: inline-block;
}
#foot span {
color: white;
font-size: 2.2vh;
margin-right: 1vw;
text-shadow: 0.1vh 0.1vh #666;
}
button::first-letter {
color: #666;
}
.buttons {
display: inline;
}
#split:after {
content: "SOLO";
}
#split.disabled:after {
content: "SPLIT";
}
#play:after {
content: "PAUSE";
}
#play.disabled:after {
content: "PLAY";
}
.cm-s-default .cm-link {
text-decoration: none;
color: #05a;
}
.cm-link {
cursor:help;
}
#state:after {
content: "Save";
}
#state, #state.wait {
color: #999;
}
#state.wait:after {
content: "Wait!";
}
#state.good {
color: rgb(220,255,220);
}
#state.bad {
color: rgb(255,128,128);
}
#soundcloud {
display: none;
}
body.soundcloud #soundcloud {
display: inline;
}
#tap {
width: 100vw;
height:100vh;
position: fixed;
top:0; left:0;
background: rgba(0,0,0,0.9);
display: none;
justify-content: center;
}
body.muted #tap {
display: flex;
}
#tap div {
color: white;
font-size: 3.33vh;
font-weight: bold;
align-self: center;
}
#title {
color: white;
font-size: 6.66vh;
font-weight: bold;
align-self: center;
z-index: 10;
position: fixed;
width: 100vw;
text-align:center;
text-shadow: 0.33vh 0.33vh black;
left:0;
top: 10vh;
transition: opacity 1s;
opacity: 0;
pointer-events: none;
}
#title.show {
opacity: 1;
}
#main, #side {
transition: opacity 0.33s;
transition-delay: 0.66s;
}
body.hide-editor #main, body.hide-editor #side{
opacity: 0;
}
</style>
</head>
<body>
<div id=title></div>
<div id="audio" title="WARNING: The volume control affects the measurements.">
</div>
<div id="header" >
<img id="logo" title="Rayglider © 2018 Yannis Gravezas <[email protected]>" src="./favicon.png"/>
<div class="buttons" title="Alt+<Letter> toggles buttons. The State link's url contains a snapshot of the current state.">
<button accesskey="N" id="create">NEW</button>
<button accesskey="F" id="full">FULL</button>
<button accesskey="H" id="hd">HD</button>
<button accesskey="C" id="code" class="disabled">CODE</button>
<button accesskey="J" id="joy">JOY</button>
</div>
<div class="buttons">
<a id="state" href="" target="_blank" ></a>
<a style="color: rgb(220,220,255);" href="https://www.github.com/wizgrav/rayglider" target="_blank">About</a>
</div>
<img id="soundcloud" style="float: right; margin-top: 1vh; margin-right: 1vw;" src="./assets/soundcloud.png"/>
<div id="info"></div>
</div>
<div id="export">
<div id="main">
</div>
<div id="side">
</div>
<div id="foot">
<div style="text-align: left; float:left;width:25vw;">
<button accesskey="A" id="apply">APPLY</button>
<button accesskey="P" id="play"></button>
</div>
<div id="stats" style="text-align: center; padding-top:1.61vh;width:50vw;">
<span style="color:#EEE"></span>
<span></span>
<span id="time" style="color:#EEE"></span></div>
<div style="text-align: right; float: right; width:25vw;">
<button accesskey="R" id="reset">RESET</button>
<button accesskey="S" id="split"></button>
</div>
</div>
<audio controls loop muted></audio>
</div>
<canvas></canvas>
<div id="tap"> <div style="text-align:center">Tap/Click to unmute<br/>Drag and drop your audio files to listen</div> </div>
<script src="./dist/rayglider.js"></script>
</body>
</html>