-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
438 lines (420 loc) · 19.8 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
<!DOCTYPE html>
<html>
<head>
<script>
if (navigator.userAgent.indexOf("MSIE ") > -1 || navigator.userAgent.indexOf("Trident/") > -1)
alert(
"Internet explorer is not supported.\nPlease try again with a recent browser like Google Chrome or Microsoft Edge."
);
</script>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Sounds of Transport</title>
<link rel="apple-touch-icon" sizes="180x180" href="public/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="public/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="public/favicon-16x16.png" />
<link rel="manifest" href="public/site.webmanifest" />
<!-- Google Analytics tracking code -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-98513512-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "UA-98513512-2");
</script>
<!-- Google Analytics tracking code -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css" />
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46 CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
crossorigin=""
/>
<script
src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha512-GffPMF3RvMeYyc1LWMHtK8EbPv0iNZ8/oTtHPx9/cc2ILxQ u905qIwdpULaqDkyBKgOaB57QTMg7ztg8Jm2Og=="
crossorigin=""
></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.EasyButton/2.4.0/easy-button.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/0.4.2/leaflet.draw.css" />
<link rel="stylesheet" href="public/css/marker_cluster.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/0.4.2/leaflet.draw.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.EasyButton/2.4.0/easy-button.min.js"></script>
<script src="public/javascript/leaflet.motion.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/src/leaflet.geometryutil.js"></script>
<script src="https://unpkg.com/[email protected]/dist/leaflet.markercluster.js"></script>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.6.2/css/bootstrap-slider.min.css"
/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.6.2/bootstrap-slider.min.js"></script>
<script src="https://cdn.rawgit.com/osamutake/japanese-holidays-js/v1.0.9/lib/japanese-holidays.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lz-string/1.4.4/lz-string.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js"></script>
<link rel="stylesheet" href="public/css/style.css" />
<script type="module" src="public/javascript/utils.js"></script>
<script type="module" src="public/javascript/sound_controller.js"></script>
<script type="module" src="public/javascript/data_handler.js"></script>
<script type="module" src="public/javascript/map_control.js"></script>
<script type="module" src="public/javascript/index.js"></script>
</head>
<body>
<div class="container-fluid main-wrapper p-0">
<div id="interactiveMap" class="h-100"></div>
</div>
<div id="audio-wrapper"></div>
<!-- Modal info -->
<div
class="modal fade"
id="modal-info"
tabindex="-1"
role="dialog"
aria-labelledby="modal-info-title"
aria-hidden="true"
>
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modal-info-title">What is Sounds of Transport?</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body p-3"></div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Modal settings -->
<div
class="modal fade"
id="modal-settings"
tabindex="-1"
role="dialog"
aria-labelledby="modal-settings-title"
aria-hidden="true"
>
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modal-settings-title">Settings</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="form-group pb-3 border-bottom">
<h5 class="pb-1">
Filter lines by # of stations
<span
class="d-inline-block"
tabindex="-1"
data-toggle="popover"
data-trigger="focus"
title="Filter by number of stations on a line"
data-html="true"
style="font-size:65%"
data-content="You can choose to display or remove train lines based on the number of stations they have by using the slider below."
><small><i class="far fa-question-circle ml-1"></i></small
></span>
</h5>
<div class="form-row px-5 pb-3 mb-1">
<input
id="stationFilter"
type="text"
data-slider-ticks="[0, 10, 20, 30, 40, 50, 60, 70]"
data-slider-ticks-snap-bounds="2"
data-slider-ticks-labels='["0", "10", "20", "30", "40", "50", "60", "70"]'
/>
</div>
</div>
<div class="form-group pb-3 border-bottom">
<h5>
Filter lines by operators
<span
class="d-inline-block"
tabindex="-1"
data-toggle="popover"
data-trigger="focus"
title="Filter by train operators"
data-html="true"
style="font-size:65%"
data-content="You can choose to remove or display the train lines by checking their operators below."
><small><i class="far fa-question-circle ml-1"></i></small
></span>
</h5>
<div id="operator-form" class="form-row pl-5 py-3">
<div class="col-md-3">
<input class="form-check-input" type="checkbox" id="cb_Odakyu" value="Odakyu" />
<label class="form-check-label" for="cb_Odakyu">Odakyu</label>
</div>
<div class="col-md-3">
<input class="form-check-input" type="checkbox" id="cb_Keisei" value="Keisei" checked />
<label class="form-check-label" for="cb_Keisei">Keisei</label>
</div>
<div class="col-md-3">
<input class="form-check-input" type="checkbox" id="cb_Seibu" value="Seibu" checked />
<label class="form-check-label" for="cb_Seibu">Seibu</label>
</div>
<div class="col-md-3">
<input class="form-check-input" type="checkbox" id="cb_JR-East" value="JR-East" checked />
<label class="form-check-label" for="cb_JR-East">JR-East</label>
</div>
<div class="col-md-3">
<input class="form-check-input" type="checkbox" id="cb_Toei" value="Toei" checked />
<label class="form-check-label" for="cb_Toei">Toei</label>
</div>
<div class="col-md-3">
<input class="form-check-input" type="checkbox" id="cb_Keikyu" value="Keikyu" />
<label class="form-check-label" for="cb_Keikyu">Keikyu</label>
</div>
<div class="col-md-3">
<input class="form-check-input" type="checkbox" id="cb_Keio" value="Keio" />
<label class="form-check-label" for="cb_Keio">Keio</label>
</div>
<div class="col-md-3">
<input class="form-check-input" type="checkbox" id="cb_Tobu" value="Tobu" />
<label class="form-check-label" for="cb_Tobu">Tobu</label>
</div>
<div class="col-md-3">
<input class="form-check-input" type="checkbox" id="cb_TWR" value="TWR" />
<label class="form-check-label" for="cb_TWR">TWR</label>
</div>
<div class="col-md-3">
<input class="form-check-input" type="checkbox" id="cb_Yurikamome" value="Yurikamome" checked />
<label class="form-check-label" for="cb_Yurikamome">Yurikamome</label>
</div>
<div class="col-md-3">
<input class="form-check-input" type="checkbox" id="cb_TokyoMetro" value="TokyoMetro" checked />
<label class="form-check-label" for="cb_TokyoMetro">TokyoMetro</label>
</div>
<div class="col-md-3">
<input class="form-check-input" type="checkbox" id="cb_Tokyu" value="Tokyu" />
<label class="form-check-label" for="cb_Tokyu">Tokyu</label>
</div>
</div>
</div>
<div class="form-group pb-3">
<h5 class="pb-1">
Time travel
<span
class="d-inline-block"
tabindex="-1"
data-toggle="popover"
data-trigger="focus"
title="Simulate a particular time"
data-html="true"
style="font-size:65%"
data-content="Select the date/time you want to simulate from the control below, once you click apply train timetables will be simulated according to that time, basically time travelling."
><small><i class="far fa-question-circle ml-1"></i></small
></span>
</h5>
<div class="form-row">
<div class="col-8">
<input type="text" class="form-control" name="dateOverride" />
</div>
<div class="col-4">
<button class="btn btn-primary w-100" class="form-control" name="dateReset">Reset to now</button>
</div>
</div>
</div>
<div class="form-group pb-3">
<h5 class="pb-1">
Create a share code
<span
class="d-inline-block"
tabindex="-1"
data-toggle="popover"
data-trigger="focus"
title="Sharing your creations"
data-html="true"
style="font-size:65%"
data-content="You can create a unique code for your creations and share with friends!<br>Your sharable code below includes your selected options, such as current map location, filtered operators etc..."
><small><i class="far fa-question-circle ml-1"></i></small
></span>
</h5>
<div class="form-row">
<div id="text-share-info" class="w-100 text-muted bg-light p-1 m-1 text-center">
Click the create button to create a shareable code.
</div>
<div class="col-md-9">
<div class="input-group">
<textarea
class="form-control"
style="word-break: break-all;"
id="input-share"
placeholder="Once you click share, your shareable code will be generated here. Or, you can paste a pre-made code here and click the load button."
rows="3"
></textarea>
<div class="input-group-append">
<div class="input-group-text px-1">
<button id="copy-share" class="btn" data-clipboard-target="#input-share">
<i class="far fa-copy"></i>
</button>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<button class="btn btn-primary w-100 my-1" class="form-control" id="btn-share" name="share">
Create
</button>
<button class="btn btn-primary w-100 mb-1" class="form-control" id="btn-load" name="share">
Load
</button>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button id="btn-filter" type="button" class="btn btn-primary" data-dismiss="modal">Save</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="loading-overlay">
<div class="loading-overlay-content">
<div class="spinner-border text-light" role="status">
<span class="sr-only">Loading...</span>
</div>
<h1 class="spinner-text text-light">Loading...</h1>
</div>
</div>
<div>
<div id="circle-popup" class="d-none">
<div>
<div class="p-1 px-3 m-1 font-weight-bold border-bottom text-center">
😮 A circle receiver control plays continuously when triggered!
</div>
<div class="form-group">
<label for="volume-slider">Volume<span class="px-1">(<span>100</span>%)</span></label>
<input
type="range"
class="custom-range form-control popup-input"
id="volume-slider"
min="0"
max="100"
step="5"
value="100"
data-handle="meta_volume"
/>
</div>
<div class="form-group">
<label for="sample-select">Select sample</label>
<select class="form-control popup-input" id="sample-select" data-handle="meta_audio">
<option value="kick_1">Kick drum</option>
<option value="snare_1">Snare</option>
<option value="hi_hat_1">Hi-hat (Closed)</option>
<option value="hi_hat_2">Hi-Hat (Open)</option>
<option value="groovy_1">Groovy loop</option>
<option value="funk_1">Funky loop</option>
<option value="funk_2">Funky loop(2)</option>
<option value="jazz_1" selected>Jazz loop</option>
<option value="jazz_2">Jazz loop(2)</option>
<option value="metal_1">Metal loop</option>
<option value="metal_2">Metal loop(2)</option>
</select>
</div>
</div>
</div>
<div id="rectangle-popup" class="d-none">
<div>
<div class="p-1 px-3 m-1 font-weight-bold border-bottom text-center">
😴 A rectangle receiver needs to rest, so it periodically starts and stops listening.
</div>
<div class="form-group">
<label for="volume-slider">Volume<span class="px-1">(<span>100</span>%)</span></label>
<input
type="range"
class="custom-range form-control popup-input"
id="volume-slider"
min="0"
max="100"
step="5"
value="100"
data-handle="meta_volume"
/>
</div>
<div class="form-group">
<label for="sample-select">Select sample</label>
<select class="form-control popup-input" id="sample-select" data-handle="meta_audio">
<option value="kick_1" selected>Kick drum</option>
<option value="snare_1">Snare</option>
<option value="hi_hat_1">Hi-hat (Closed)</option>
<option value="hi_hat_2">Hi-Hat (Open)</option>
<option value="groovy_1">Groovy loop</option>
<option value="funk_1">Funky loop</option>
<option value="funk_2">Funky loop(2)</option>
<option value="jazz_1">Jazz loop</option>
<option value="jazz_2">Jazz loop(2)</option>
<option value="metal_1">Metal loop</option>
<option value="metal_2">Metal loop(2)</option>
</select>
<div class="form-group">
<label for="interval-slider">Interval<span class="px-1">(<span>1000</span>ms)</span></label>
<input
type="range"
class="custom-range form-control popup-input"
id="interval-slider"
min="100"
max="5000"
step="100"
value="1000"
data-handle="meta_interval"
/>
</div>
</div>
</div>
</div>
<div id="polyline-popup" class="d-none">
<div>
<div class="p-1 px-3 m-1 font-weight-bold border-bottom text-center">
😐 A polyline receiver only activates once for each trigger!
</div>
<div class="form-group">
<label for="volume-slider">Volume<span class="px-1">(<span>100</span>%)</span> </label>
<input
type="range"
class="custom-range form-control popup-input"
id="volume-slider"
min="0"
max="100"
step="5"
value="100"
data-handle="meta_volume"
/>
</div>
<div class="form-group">
<label for="sample-select">Select sample</label>
<select class="form-control popup-input" id="sample-select" data-handle="meta_audio">
<option value="kick_1">Kick drum</option>
<option value="snare_1" selected>Snare</option>
<option value="hi_hat_1">Hi-hat (Closed)</option>
<option value="hi_hat_2">Hi-Hat (Open)</option>
<option value="groovy_1">Groovy loop</option>
<option value="funk_1">Funky loop</option>
<option value="funk_2">Funky loop(2)</option>
<option value="jazz_1">Jazz loop</option>
<option value="jazz_2">Jazz loop(2)</option>
<option value="metal_1">Metal loop</option>
<option value="metal_2">Metal loop(2)</option>
</select>
</div>
</div>
</div>
</div>
</body>
</html>