-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.html
More file actions
369 lines (319 loc) · 14.5 KB
/
main.html
File metadata and controls
369 lines (319 loc) · 14.5 KB
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
<html>
<head>
<!-- Required meta tags -->
<meta charset="UTF-8">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- FONTS -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans+Condensed:wght@700&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@100;300&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<title>PoseTrack Start</title>
<!-- IMPORTS p5.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.dom.min.js"></script>
<script src="https://unpkg.com/ml5@latest/dist/ml5.min.js" type="text/javascript"></script>
</head>
<body class="background">
<!-- NAVBAR -->
<nav class="animated4 fadeInTop navbar navbar-expand-lg navbar-light transperent sticky-top">
<!-- TITLE -->
<a class="navbar-brand" href="#">
<div class="pop">
<span class="nav-title rounded-circle px-4 py-3 h1 align-top mb-5">PoseTrack</span></a>
</div>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<!-- HOME NAV BUTTON -->
<li class="nav-item active">
<a class="nav-link ripple-btn px-4 py-4 nav-button" href="home.html">Home <span class="sr-only">(current)</span></a>
</li>
<!-- ABOUT NAV BUTTON -->
<li class="nav-item">
<a class="nav-link ripple-btn px-4 py-4 nav-button" href="home.html#about-section">About</a>
</li>
<!-- EXERCISES NAV DROPDOWN -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle ripple-btn px-4 py-4 nav-button" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Exercises
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="home.html#point-tapping-section">Point Tapping</a>
<a class="dropdown-item" href="home.html#hole-in-the-wall-section">Hole In The Wall</a>
<a class="dropdown-item" href="home.html#dodge-point-section">Dodge Point</a>
</div>
</li>
</ul>
</div>
</nav>
<!-- MODEL STATUS -->
<div class="wide-con" id="main-section">
<div class="row justify-content-center">
<div class="col-md d-flex align-items-center justify-content-center animated1 fadeInLeft">
<p class="subtitle pop" id="status">Loading model...</p>
</div>
</div>
</div>
<!-- MAIN CONTENT -->
<div class="row justify-content-center">
<!-- SIDEBAR -->
<div class="col-md d-flex align-items-center justify-content-center animated3 fadeInLeft">
<div class="sidebar bg-light">
<!-- MODES LABEL -->
<div class="row justify-content-center">
<div class="col-md d-flex align-items-center justify-content-center">
<h1 class="contenttitle pop">Modes</h1>
</div>
</div>
<!-- GAME MODE DROPDOWN -->
<div class="row justify-content-center">
<div class="col-md d-flex align-items-center justify-content-center">
<button class="btn highlight-bg btn-lg main-btn pop dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span id="dropdown-show">
Game Mode
</span>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<button class="dropdown-item btn" onclick="choose(1)">Point Tapping</button>
<button class="dropdown-item btn" onclick="choose(2)">Hole in the Wall</button>
<button class="dropdown-item btn" onclick="choose(3)">Dodge Point</button>
</div>
</div>
</div>
<!-- OPTIONS LABEL -->
<div class="row justify-content-center">
<div class="col-md d-flex align-items-center justify-content-center">
<h1 class="contenttitle pop">Options</h1>
</div>
</div>
<!-- SHOW HITBOXES CHECKBOX -->
<div class="row justify-content-center">
<div class="col-md d-flex align-items-center justify-content-center">
<div class="form-check">
<input type="checkbox" class="form-check-input" id="show-hitboxes">
<label class="form-check-label" for="show-hitboxes">Show Hitboxes</label>
</div>
</div>
</div>
<!-- SPACING -->
<br>
<!-- IMAGE INPUT CONTENT -->
<!-- HEAD INPUT -->
<div class="row justify-content-center">
<div class="col-md d-flex align-items-center justify-content-center">
<div>
<label for="head-upload">Choose a head image:</label>
<input type="file"
id="head-upload" name="avatar"
accept="image/png, image/jpeg" onchange="readURL(this, 'head')">
</div>
</div>
</div>
<!-- SPACING -->
<br>
<!-- BODY INPUT -->
<div class="row justify-content-center">
<div class="col-md d-flex align-items-center justify-content-center">
<div>
<label for="body-upload">Choose a body image:</label>
<input type="file"
id="bpdy-upload" name="avatar"
accept="image/png, image/jpeg" onchange="readURL(this, 'chest')">
</div>
</div>
</div>
<!-- SPACING -->
<br>
<!-- HIP INPUT -->
<div class="row justify-content-center">
<div class="col-md d-flex align-items-center justify-content-center">
<div>
<label for="hip-upload">Choose a hip image:</label>
<input type="file"
id="hip-upload" name="avatar"
accept="image/png, image/jpeg" onchange="readURL(this, 'hip')">
</div>
</div>
</div>
<!-- SPACING -->
<br>
<!-- ARM INPUT -->
<div class="row justify-content-center">
<div class="col-md d-flex align-items-center justify-content-center">
<div>
<label for="arm-upload">Choose an arm image:</label>
<input type="file"
id="arm-upload" name="avatar"
accept="image/png, image/jpeg" onchange="readURL(this, 'leftArm'); readURL(this, 'rightArm'); readURL(this, 'leftShoulder'); readURL(this, 'rightShoulder'); ">
</div>
</div>
</div>
<!-- SPACING -->
<br>
<!-- LEG INPUT -->
<div class="row justify-content-center">
<div class="col-md d-flex align-items-center justify-content-center">
<div>
<label for="foot-upload">Choose a foot image:</label>
<input type="file"
id="foot-upload" name="avatar"
accept="image/png, image/jpeg" onchange="readURL(this, 'leftThigh'); readURL(this, 'rightThigh'); readURL(this, 'leftFoot'); readURL(this, 'rightFoot'); ">
</div>
</div>
</div>
<!-- SPACING -->
<br>
<!-- SPIDER CONTENT -->
<!-- SMOOTHNESS SLIDER -->
<p class="subtitle option-label pop">Smoothness:
<span class="optiontitle option-label-value"></span>
</p>
<div class="row justify-content-center">
<div class="col-md d-flex align-items-center justify-content-center">
<input type="range" class="slider" oninput="updateSliders()" min="1" max="50" value="8" step="1" id="smoothness">
</div>
</div>
<!-- SPACING -->
<br>
<!-- THRESHOLD SLIDER -->
<p class="subtitle option-label pop">Threshold:
<span class="optiontitle option-label-value"></span>
</p>
<div class="row justify-content-center">
<div class="col-md d-flex align-items-center justify-content-center">
<input type="range" class="slider" oninput="updateSliders()" min="0.1" max="1" value="0.2" step="0.1" id="threshold">
</div>
</div>
<!-- SPACING -->
<br>
<!-- HEAD HEIGHT RATIO SLIDER -->
<p class="subtitle option-label pop">Head Height Ratio:
<span class="optiontitle option-label-value"></span>
</p>
<div class="row justify-content-center">
<div class="col-md d-flex align-items-center justify-content-center">
<input type="range" class="slider" oninput="updateSliders()" min="1" max="10" value="2" step="1" id="head_height_ratio">
</div>
</div>
<!-- SPACING -->
<br>
<!-- HEAD WIDTH TO HEIGHT RATIO SLIDER -->
<p class="subtitle option-label pop">Head Width to Height:
<span class="optiontitle option-label-value"></span>
</p>
<div class="row justify-content-center">
<div class="col-md d-flex align-items-center justify-content-center">
<input type="range" class="slider" oninput="updateSliders()" min="0.1" max="1" value="0.8" step="0.1" id="head_width_to_height">
</div>
</div>
<br>
<!-- HEAD IMAGE RATIO SLIDER -->
<p class="subtitle option-label pop">Head Image Ratio:
<span class="optiontitle option-label-value"></span>
</p>
<div class="row justify-content-center">
<div class="col-md d-flex align-items-center justify-content-center">
<input type="range" class="slider" oninput="updateSliders()" min="1" max="10" value="2" step="1" id="head_image_ratio">
</div>
</div>
<!-- SPACING -->
<br>
<!-- LIMB WIDTH RATIO SLIDER -->
<p class="subtitle option-label pop">Limb Width Ratio:
<span class="optiontitle option-label-value"></span>
</p>
<div class="row justify-content-center">
<div class="col-md d-flex align-items-center justify-content-center">
<input type="range" class="slider" oninput="updateSliders()" min="1" max="10" value="4" step="1" id="limb_width_ratio">
</div>
</div>
<!-- SPACING -->
<br>
<!-- LIMB LENGTH RATIO SLIDER -->
<p class="subtitle option-label pop">Limb Length Ratio:
<span class="optiontitle option-label-value"></span>
</p>
<div class="row justify-content-center">
<div class="col-md d-flex align-items-center justify-content-center">
<input type="range" class="slider" oninput="updateSliders()" min="1" max="2" value="1.25" step="0.25" id="limb_length_ratio">
</div>
</div>
<!-- SPACING -->
<br>
<!-- HIP HEIGHT RATIO SLIDER -->
<p class="subtitle option-label pop">Hip Height Ratio:
<span class="optiontitle option-label-value"></span>
</p>
<div class="row justify-content-center">
<div class="col-md d-flex align-items-center justify-content-center">
<input type="range" class="slider" oninput="updateSliders()" min="0.1" max="1" value="0.5" step="0.1" id="hip_height_ratio">
</div>
</div>
<!-- SPACING -->
<br>
<!-- HIP WIDTH RATIO SLIDER -->
<p class="subtitle option-label pop">Hip Width Ratio:
<span class="optiontitle option-label-value"></span>
</p>
<div class="row justify-content-center">
<div class="col-md d-flex align-items-center justify-content-center">
<input type="range" class="slider" oninput="updateSliders()" min="1" max="5" value="1.2" step="0.2" id="hip_width_ratio">
</div>
</div>
<!-- SPACING -->
<br>
<br>
<br>
<br>
</div>
</div>
<!-- GAME CANVAS -->
<div class="col-md d-flex align-items-center justify-content-center animated2 fadeInLeft">
<canvas id="feed">
</div>
</div>
<!-- APPLY BUTTON -->
<div class="row">
<div class="col-md d-flex flex-row-reverse animated6 fadeInBottom apply-btn" id="apply-options-btn">
<button onclick="applyOptions()" class="btn-apply ripple-btn px-5 py-2 rounded nav-start text-white text-center align-top pop">
<span>Apply</span>
<!-- SPACING -->
<br>
<span>→</span>
</button>
</div>
</div>
</div>
<!-- IMPORTING THE AVATAR PARTS TO BE USED IN THE GAME -->
<!-- HIDDEN FROM VIEW -->
<div style="display: none">
<img src="./images/chest.png" id="chest">
<img src="./images/head.png" id="head">
<img src="./images/hip.png" id="hip">
<img src="./images/leftArm.png" id="leftArm">
<img src="./images/leftFoot.png" id="leftFoot">
<img src="./images/leftShoulder.png" id="leftShoulder">
<img src="./images/leftThigh.png" id="leftThigh">
<img src="./images/neck.png" id="neck">
<img src="./images/rightArm.png" id="rightArm">
<img src="./images/rightFoot.png" id="rightFoot">
<img src="./images/rightShoulder.png" id="rightShoulder">
<img src="./images/rightThigh.png" id="rightThigh">
</div>
<!-- JAVASCRIPT -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<!-- FOR RIPPLE EFFECT AND SLIDERS -->
<script src="script.js"></script>
<!-- FOR GAME -->
<script src="app.js"></script>
</body>
</html>