-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
74 lines (74 loc) · 2.79 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<link rel="stylesheet" href="src/styles.css" />
<title>Гоняем шары</title>
</head>
<body>
<canvas id="canvas" width="500px" height="500px"></canvas>
<div class="balls-container">
<div class="info-balls-container">
<div>
<span>Количество шаров:</span>
<input id="balls-count" type="number" min="0" max="100" value="20" style="width:40px; margin: 2px; vertical-align: middle;" />
</div>
<button id="collapse-balls">Развернуть</button>
<button id="show-gen-speed">Генерация скоростей</button>
<button id="show-gen-sound">Генерация звуков</button>
</div>
<div id="expand-speed" style="display: none">
<span>Тут можно написать формулу для генерации скоростей шаров. Нумерация начинается с 0.</span>
<br>
<code>i -> </code>
<textarea style="vertical-align:middle; width:80%" id="gen-code" rows="3">200+4*i</textarea>
<br>
<button id="run-code">Сгенерировать</button>
<br>
<br>
</div>
<div id="expand-sound" style="display: none">
<span>Заполнить диапазон</span>
<br>
<div id="fill-range-sound">
<span>От: </span>
<select id="sound-from-select"></select>
<input type="number" id="sound-from-input" step="0.01" style="width: 70px">
<br>
<span>До: </span>
<select id="sound-to-select"></select>
<input type="number" id="sound-to-input" step="0.01" style="width: 70px">
<br>
<button id="run-sound">Сгенерировать</button>
<br>
<br>
</div>
</div>
<div id="table-balls" style="display: none">
<div id="table-scroll">
<table id="balls-speeds"></table>
</div>
</div>
</div>
<div class="canvas-container">
<div class="start-stop-wrapper">
<button id="start-stop-button">Старт</button>
<button id="reset-button">Сброс</button>
</div>
<div class="speed-bar">
Скорость:
<input id="speed" type="range" min="-1" max="1" step="0.01" value="0" style="flex-grow: 1" />
<span id="speed-value">1.00</span>
<div class="speed-bar-val">
</div>
</div>
</div>
<script type="module" src="src/index.js"></script>
<script type="module" src="src/ball.js"></script>
<script type="module" src="src/sound.js"></script>
</body>
</html>