-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
150 lines (123 loc) · 7.75 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Coli Sphericus</title>
<link rel="icon"
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🦠</text></svg>">
<link rel="stylesheet" type="text/css" href="./web/style.css">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"></script>
</head>
<body>
<a id="downloader" target="_blank" download="data.csv" hidden></a>
<div id="widget_cache" style="display: none;">
<button id="stopbtn" class="btn btn-success d-flex align-items-center m-2" onclick="stopDrawing()">Стоп<i
class="bi-stop-fill" style="font-size: 1.5em; line-height: 1em; margin-left: 5px;"></i></button>
</div>
<div class="navbar navbar-expand-sm navbar-light bg-light position-absolute top-0"
style="width: 100vw; height: fit-content; box-shadow: 0px 0.5px 5px 0px grey;">
<div class="container-fluid align-items-center" id="control_panel">
<button id="startbtn" class="btn btn-primary d-flex flex-row align-items-center m-2"
onclick="startDrawing()">
Старт<i class="bi-play-fill" style="font-size: 1.5em; line-height: 1em; margin-left: 5px;"></i>
</button>
<button class="btn btn-danger d-flex align-items-center m-2" onclick="clearDrawing()">Очистити<i
class="bi-arrow-counterclockwise"
style="font-size: 1.5em; line-height: 1em; margin-left: 5px;"></i></button>
<button id="popbtn" class="btn btn-secondary d-flex align-items-center m-2" data-bs-toggle="popover"
data-bs-placement="bottom">Опції<i class="bi-gear-fill"
style="font-size: 1.1em; line-height: 1em; margin-left: 5px;"></i></button>
<button class="btn btn-outline-primary d-flex flex-row align-items-center justify-content-between m-2"
title="Завантажити дані" onclick="downloadData()"><i class="bi-download"
style="font-size: 1.2em; line-height: 1em;"></i> <!-- margin-right: 5px; -->
<!-- <span style="white-space: nowrap;">Завантажити дані</span> -->
</button>
<div class="input-group m-2">
<span class="input-group-text">швидкість:</span>
<input class="form-control" id="speed" type="number" value="1">
<span class="input-group-text">мм/с</span>
</div>
<div class="input-group m-2">
<span class="input-group-text">час:</span>
<input class="form-control" id="time" type="number" value="15">
<span class="input-group-text">хв</span>
</div>
<div style="display: none; visibility: hidden;">
<div id="popover" class="param-list-wrapper">
<form>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="param_bounded">
<label class="form-check-label" for="param_bounded">Не виходити за межі</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="param_wait">
<label class="form-check-label" for="param_wait">Дочекатися закінчення росту колоній</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="param_hungry">
<label class="form-check-label" for="param_hungry">Голодні колонії</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="param_zalpha">
<label class="form-check-label" for="param_zalpha">Прозорі сфери</label>
</div>
<br>
<div>
<label for="param_neighbour_limit" class="form-label">Вбивча доза сусідів:</label>
<input type="number" class="form-control" id="param_neighbour_limit" value="5">
</div>
<br>
Генерувати дані:
<div class="form-check">
<input type="checkbox" class="form-check-input" id="param_gen_St">
<label class="form-check-label" for="param_gen_St">S<sub>загальна</sub>(t)</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="param_gen_Nt">
<label class="form-check-label" for="param_gen_Nt">N<sub>активних</sub>(t)</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="param_gen_Tt">
<label class="form-check-label" for="param_gen_Tt">T<sub>життя колоній</sub>(t)</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="param_gen_size_distrib">
<label class="form-check-label" for="param_gen_size_distrib">розподіл за розмірами</label>
</div>
<br />
<div>
<label for="param_dim" class="form-label">Кількість вимірів:</label>
<input type="number" class="form-control" id="param_dim" value="2">
</div>
<div class="mt-2">
<label for="param_iter_per_sec" class="form-label">Здійснювати ітерацій для моделювання 1
секунди:</label>
<input type="number" class="form-control" id="param_iter_per_sec" value="2">
</div>
<div class="mt-2">
<label for="param_freq" class="form-label">Частота (ітерацій за секунду):</label>
<input type="number" class="form-control" id="param_freq" value="20">
</div>
</form>
</div>
</div>
</div>
</div>
<canvas class="mt-3" id="canvas" width="1000" height="1000">
HTML5 is required by this page but is not supported by your browser.
</canvas>
<div class="fixed-bottom m-2">
<a href="https://github.com/MarkLagodych/ColiSphericus">GitHub</a>
</div>
<script type="module">
import './web/index.js';
</script>
</body>
</html>