-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
211 lines (177 loc) · 8.45 KB
/
Copy pathindex.html
File metadata and controls
211 lines (177 loc) · 8.45 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
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Radioactive Decay Visualisation</title>
<link rel="stylesheet" href="webapp/style.css" />
<link rel="stylesheet" href="webapp/modal.css" />
<link rel="icon" type="image/x-icon" href="webapp/icon.ico" />
</head>
<body>
<header>
<h1>Radioactive Decay Visualisation</h1>
<p id="undercaption">Visual simulation of radioactive decay chains.</p>
</header>
<div class="container">
<div class="panel">
<div style="display: flex; justify-content: space-between;">
<div class="control-group">
<label for="max-time-input">Maximum Time</label>
<div class="time-display"><span id="years-max">100.00</span> years</div>
</div>
<div class="control-group">
<label style="text-align: end;">Simulated Time</label>
<div class="time-display"><span id="years-val">0.00</span> years</div>
</div>
</div>
<input type="range"
id="max-time-input"
name="maxTime"
min="0"
max="200"
step="0.25"
style="width: 100%; margin-bottom: 20px; margin-top: 0px;"
value="100"
oninput="document.getElementById('years-max').innerText = parseFloat(this.value).toFixed(2)"
>
<div class="btn-row">
<button id="btn-play" class="primary">Start</button>
<button id="btn-reset">Reset</button>
</div>
<div class="control-group">
<div style="display: flex;justify-content: space-between; align-items: center;">
<label for="count-slider">Count</label>
<div><span id="particleCount-label">500</span> atoms</div>
</div>
<input type="range" id="count-slider" min="10" max="3000" step="10" value="500" style="width:100%">
</div>
<div class="control-group">
<div style="display: flex;justify-content: space-between; align-items: center;">
<label for="speed-slider">Simulation steps</label>
<div><span id="years-step">1.00</span> years</div>
</div>
<input type="range" id="speed-slider" min="0.0001" max="5" step="0.0001" value="1" style="width:100%">
</div>
<div class="control-group">
<div style="display: flex; justify-content: space-between; align-items: center;">
<label>Iterations (Max time / Step size)</label>
<div><span id="iterations-count">--</span></div>
</div>
</div>
<hr style="border-color: #334155; margin: 25px 0;">
<div class="substances">
<div class="control-group">
<label for="preset-select">Preset</label>
<select id="preset-select"></select>
<p id="preset-description" class="preset-description"></p>
</div>
<div style="display: flex; align-items: center; justify-content: space-between;">
<h3>Substances & fractions</h3>
<button id="btn-edit" style="padding: 5px 5px; margin-left: 15px;">Edit</button>
</div>
<div id="stats-container"></div>
</div>
</div>
<div class="visualization-area" style="display: flex; flex-direction: column; gap: 20px;" text-align: center;>
<div class="canvas-container">
<div class="canvas-label">Atomic lattice (phase transition)</div>
<canvas id="particle-canvas" height="300"></canvas>
</div>
<div class="canvas-container" >
<div class="canvas-toolbar">
<div class="canvas-label">Chart</div>
<div class="segmented-control" aria-label="Graph-Daten">
<button id="graph-theoretical" class="active" type="button">Theory</button>
<button id="graph-random" type="button">Random</button>
</div>
</div>
<div id="chart-plot" class="plotly-chart"></div>
</div>
<div class="canvas-container simulation-stats-panel">
<div class="canvas-label">Simulation stats</div>
<div class="simulation-stats" id="simulation-stats" aria-live="polite">
<div class="stats-grid">
<div class="stat-pill">
<span class="stat-pill-label">Substances</span>
<span class="stat-pill-value" id="substance-count">--</span>
</div>
<div class="stat-pill">
<span class="stat-pill-label">Atoms</span>
<span class="stat-pill-value" id="fit-atoms">--</span>
</div>
<div class="stat-pill">
<span class="stat-pill-label">Samples</span>
<span class="stat-pill-value" id="fit-samples">--</span>
</div>
<div class="stat-pill">
<span class="stat-pill-label">Mass Error</span>
<span class="stat-pill-value" id="mass-error">--</span>
</div>
<div class="stat-pill">
<span class="stat-pill-label">Decayed This Step</span>
<span class="stat-pill-value" id="decayed-step">--</span>
</div>
<div class="stat-pill">
<span class="stat-pill-label">Stable Fraction</span>
<span class="stat-pill-value" id="stable-fraction">--</span>
</div>
<div class="stat-pill">
<span class="stat-pill-label">Fit Error</span>
<span class="stat-pill-value" id="fit-error">--</span>
</div>
<div class="stat-pill">
<span class="stat-pill-label">Fit Score</span>
<span class="stat-pill-value" id="fit-score">--</span>
</div>
<div class="stat-pill">
<span class="stat-pill-label">Live Deviation</span>
<span class="stat-pill-value" id="live-deviation">--</span>
</div>
<div class="stat-pill">
<span class="stat-pill-label">FPS</span>
<span class="stat-pill-value" id="perf-fps">--</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="settings-modal" class="modal">
<div class="modal-content">
<div class="modal-header">
<h2>Edit substances and their fractions</h2>
<button
id="modal-close-x"
class="close-btn">
×
</button>
</div>
<div class="modal-body">
<div id="modal-substances-container"></div>
<hr>
<div>
<h3>New substance</h3>
<hr>
<div id="modal-add-container"></div>
</div>
</div>
<div class="modal-footer">
<button id="modal-cancel-btn">
Cancel
</button>
<button
id="modal-save-btn"
class="primary">
Save
</button>
</div>
</div>
</div>
<script src="webapp/decay.js" defer></script>
<script src="webapp/presets.js" defer></script>
<script src="https://cdn.plot.ly/plotly-2.35.2.min.js" defer></script>
<script src="webapp/script.js" defer></script>
<script src="webapp/editModal.js" defer></script>
</body>
</html>