-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
90 lines (90 loc) · 2.14 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
<!DOCTYPE html>
<html>
<head>
<title>Ping-Pong JavaScript</title>
<!-- Задаём стили для всего документа -->
<!--<script src="https://cdn.jsdelivr.net/npm/onnxjs/dist/onnx.min.js"></script>-->
<style>
html,
body {
height: 100%;
margin: 0;
}
body {
background: black;
display: flex;
align-items: center;
justify-content: center;
}
.download {
position: fixed;
cursor: pointer;
left: 250px;
top: 50px;
}
.delete {
position: fixed;
cursor: pointer;
left: 325px;
top: 50px;
}
.logging {
color: white;
position: fixed;
left: 100px;
top: 50px;
}
.datasetSize {
color: white;
position: fixed;
left: 400px;
top: 35px;
}
.score {
color: white;
position: fixed;
left: 100px;
bottom: 35px;
}
.upload {
color: white;
position: fixed;
right: 100px;
top: 35px;
}
.upload input {
display: none;
}
.upload label:hover{
cursor: pointer;
}
</style>
</head>
<body>
<!-- Рисуем игровое поле -->
<canvas width="750" height="585" id="game"></canvas>
<h5 class="logging"></h5>
<h1 class="datasetSize">0</h1>
<div class="download">
<img src="assets/download.svg" width="50px"><a download="ping_pong_dataset.csv" href='none'></a></img>
</div>
<div class="delete">
<img src="assets/delete.svg" width="50px" />
</div>
<p class='upload'>
<label for="file_input">
<img src="assets/upload1.svg" width="50px"></img>
<img src="assets/upload2.svg" width="50px" hidden></img>
ONNX file
</label>
<input type="file" id='file_input' class="modelFile" accept=".onnx"/>
</p>
<h1 class="score">
Current: <a>0</a><br/>
Best score: <a>0</a><br/>
Average: <a>0</a>
</h1>
<script src="js/pingpong.js"></script>
<script src="js/onnx.min.js"></script>
</body>
</html>