-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
140 lines (127 loc) · 5.52 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>rhythmvision</title>
<link rel=stylesheet href=style.css>
<link rel=icon href=assets/favicon.png type="image/png">
<script src="https://cdn.jsdelivr.net/npm/@mediapipe/camera_utils/camera_utils.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@mediapipe/control_utils/control_utils.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@mediapipe/drawing_utils/drawing_utils.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@mediapipe/pose/pose.js" crossorigin="anonymous"></script>
</head>
<body>
<!-- Camera video element -->
<video id="input_video"></video>
<!-- Main window -->
<div class="container">
<!-- Logo, score and settings -->
<div id=left_container>
<img src=assets/logo.png id=logo>\
<h1>score: <span id=score style="color:white">0</span></h1>
<br><br>
<button onclick='openSettings()'>settings</button>
<br><br>
<p style="color:rgb(59, 101, 150)">a game by Jieruei Chang @knosmos</p>
</div>
<!-- Game block -->
<div id=arrow_container>
<img src=assets/circles.png style="position:absolute;bottom:0;left:0;width:100%;">
<div id=arrow_parent style="display:contents">
</div>
</div>
<!-- Video output -->
<div id="output_wrapper_wrapper">
<div id="output_wrapper">
<canvas id="output_canvas" width=1280 height=720></canvas>
</div>
<h1>gesture: <span id=gesture style="color:white">loading</span></h1>
</div>
</div>
<!-- Song selection -->
<div id=select>
<h1>rhythmvision</h1>
<h2 style="color:white">Swing arms in direction of arrows.</h2>
<h2>Select a song:</h2>
<div style="display:contents" id="song-button-container">
</div>
<!--<button id="song-arroz" onclick="selectSong('arroz')">Arroz con Pollo</button>
<button id="song-builder" onclick="selectSong('builder')">The Builder</button>
<button id="song-airship" onclick="selectSong('airship')">Airship Serenity</button>
<button id="song-cold" onclick="selectSong('cold')">Cold Funk</button>
<button id="song-voxel" onclick="selectSong('voxel')">Voxel Revolution</button>
<button id="song-maple" onclick="selectSong('maple')">Maple Leaf Rag</button>
<button id="song-show" onclick="selectSong('show')">Welcome to the Show</button>
<button id="song-desert" onclick="selectSong('desert')">Desert of Lost Souls</button>-->
</div>
<!-- Settings -->
<div id=settings>
<h1>settings</h1>
<hr>
<h2>graphics</h2>
<label for="cameraview">
<input type="checkbox" name="cameraview" id="cameraview" checked onchange="showCamera = this.checked">
Show Camera View
</label>
<!--<label for="reducedgraphics">
<input type="checkbox" name="reducedgraphics" id="reducedgraphics" onchange="reducedGraphics = this.checked">
Reduced Graphics Mode
</label>-->
<br>
<label>Pose Estimation Accuracy</label>
<input type="range" min="0" max="2" value="1" class="slider" onchange="setPoseModelComplexity(parseInt(this.value))">
<hr>
<h2>motion</h2>
<label for="squatfordown">
<input type="checkbox" name="squatfordown" id="squatfordown" onchange="squatForDown = this.checked">
Squat for Down Motion
</label>
<label for="kickforlateral">
<input type="checkbox" name="kickforlateral" id="kickforlateral" onchange="kickForLateral = this.checked">
Kick for Lateral Motion
</label>
<hr>
<h2>links</h2>
<a href="credits.html">credits</a> •
<a href="https://github.com/knosmos/rhythmvision" target="_blank">source code</a> •
<a href="https://github.com/knosmos" target="_blank">other projects</a>
<hr>
<button onclick='closeSettings()'>accept settings</button>
</div>
<!-- Custom Song -->
<div id=custom>
<h1>custom track</h1>
<hr>
<button onclick="location.href='record.html'">Record Custom Track</button>
<hr>
<h2>Upload music file:</h2>
<input type="file" name="custom-music" id="custom-music" accept=".wav,.mp3">
<h2>Upload track file:</h2>
<input type="file" name="custom-track" id="custom-track" accept=".json">
<hr>
<button onclick="playCustom()">Play</button>
<button onclick="closeCustom()">Cancel</button>
</div>
<!-- Audio -->
<audio id="track">
<source id="track-source" src="" type="audio/mp3">
</audio>
<!-- Pose estimation -->
<script src=scripts/pose.js></script>
<!-- Song track files -->
<script src=songs/the_builder3.js></script>
<script src=songs/arroz_con_pollo.js></script>
<script src=songs/cold_funk.js></script>
<script src=songs/welcome_to_the_show.js></script>
<script src=songs/desert_of_lost_souls.js></script>
<script src=songs/voxel_revolution.js></script>
<script src=songs/airship_serenity.js></script>
<script src=songs/maple_leaf_rag.js></script>
<script src=songs/living_voyage.js></script>
<script src=scripts/select.js></script>
<!-- DDR game -->
<script src=scripts/ddr.js></script>
<!-- Splash screen -->
<div id=splash></div>
</body>
</html>