-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
379 lines (344 loc) · 14.2 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
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
370
371
372
373
374
375
376
377
378
379
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Electron Gun and Microscope 3d Simulation written on top of babylon js">
<meta name="keywords" content="electron,gun,microscope,simulation,3d,babylon,babylonjs,virtual,lab">
<meta name="author" content="Simran Singh">
<title>TEM Virtual Lab</title>
<style>
/*
font-family: 'Oswald', sans-serif;
font-family: 'Montserrat', sans-serif;
font-family: 'Lato', sans-serif;
*/
html {
font-size: 14px;
}
html,
body {
width: 100%;
height: 100%;
}
h1,
h2,
h3,
h4 {
font-family: 'Montserrat', sans-serif;
}
p {
font-family: 'Lato', sans-serif;
}
body {
background: #11998e;
/* fallback for old browsers */
background: -webkit-linear-gradient(to right, #38ef7d, #11998e);
/* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to right, #38ef7d, #11998e);
/* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
overflow-y: hidden;
transition: all 0.3s;
}
a {
color: rgb(0, 174, 255) !important;
font-weight: bold;
}
canvas {
width: 100%;
height: 50rem;
margin-bottom: -0.5rem;
touch-action: none;
backface-visibility: hidden;
}
.ucontrol>div,
.lcontrol>div {
padding: 0.5rem;
}
.ucontrol .observation-mock {
width: 100%;
height: 15rem;
background: #134E5E;
background: -webkit-linear-gradient(to right, #71B280, #134E5E);
background: linear-gradient(to right, #71B280, #134E5E);
border: 0.1rem solid #555;
}
.panel {
background: rgba(255, 255, 255, 0.2);
border: 0.1rem solid #aaa;
width: 100%;
height: 100%;
box-shadow: 0.1rem 0.2rem 0.4rem #222;
padding: 0.5rem;
}
.panel.padd {
padding: 0.5rem 2rem;
}
.lcontrol .panel {
height: 13rem;
border-bottom: 0.2rem solid #333;
}
#scene-anim {
width: 100%;
height: 50rem;
position: relative;
perspective: 70rem;
z-index: 2;
}
#card {
width: 100%;
height: 100%;
position: relative;
transform-style: preserve-3d;
transition: all 0.7s;
}
#card.back {
transform: rotateY(180deg);
}
#front-face,
#back-face {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
backface-visibility: hidden;
}
#back-face {
transform: rotateY(180deg);
}
.scene {
display: none;
}
.but {
padding: 1rem 2rem;
background: none;
color: #fff;
font-family: 'Oswald', sans-serif;
text-transform: uppercase;
letter-spacing: 0.1rem;
border: 0.2rem solid #fff;
background: rgba(0, 0, 0, 0.5);
box-shadow: 0 0 0 0.1rem rgba(0, 0, 0, 0.5);
transition: all 0.3s;
}
.but:hover {
background: #fff;
color: #000;
box-shadow: 0 0 0 0.1rem #fff;
}
div[class*="scene-"] {
position: relative;
height: 100%;
width: 100%;
backface-visibility: hidden;
}
div[class*="scene-"] .next {
position: absolute;
right: 1rem;
bottom: 1rem;
backface-visibility: hidden;
}
div[class*="scene-"] .back {
position: absolute;
left: 1rem;
bottom: 1rem;
backface-visibility: hidden;
}
.scene-2,
.scene-3 {
padding: 0 !important;
background: rgb(51, 51, 51);
}
.scenes button {
background: none;
border: 0.2rem solid #fff;
font-family: 'Oswald', sans-serif;
letter-spacing: 0.1rem;
text-transform: uppercase;
padding: 1rem;
}
.lcontrol .panel {
position: relative;
}
.lcontrol .panel footer {
position: absolute;
width: 100%;
bottom: 0;
left: 0;
background: rgba(0, 0, 0, 0.5);
text-align: center;
padding: 0.5rem;
color: #fff;
font-family: 'Montserrat', sans-serif;
}
</style>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Lato|Montserrat|Oswald" rel="stylesheet">
</head>
<body>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
<br>
<div class="container-fluid">
<div class="row ucontrol">
<div class="col-md-2">
<div class="panel padd">
<div class="toast" role="alert" aria-live="assertive" aria-atomic="true" data-autohide="false">
<div class="toast-header">
<strong class="mr-auto">Welcome</strong>
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="toast-body">
You can interact with the simulation! Click, drag or zoom on the simulation!
</div>
</div>
</div>
</div>
<div class="col-md-8">
<div class="panel">
<div id="scene-anim">
<div id="card">
<div id="front-face"></div>
<div id="back-face"></div>
</div>
</div>
</div>
</div>
<div class="col-md-2">
<div class="panel padd">
<center>
<h3>OBSERVATIONS</h3>
</center>
<br>
<div class="observation-mock"></div>
<br>
<div class="progress">
<div class="progress-bar bg-success" role="progressbar" style="width: 25%" aria-valuenow="25"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
<br>
<div class="progress">
<div class="progress-bar bg-danger" role="progressbar" style="width: 100%" aria-valuenow="100"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
<br>
<div class="progress">
<div class="progress-bar bg-warning" role="progressbar" style="width: 75%" aria-valuenow="75"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
<br>
<div class="progress">
<div class="progress-bar bg-info" role="progressbar" style="width: 50%" aria-valuenow="50"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
<br>
</div>
</div>
</div>
<div class="row lcontrol">
<div class="col">
<div class="panel">
<center>
<div class="btn-group btn-group-lg align-self-center scenes" role="group"
aria-label="Basic example">
<button type="button" data-scene="1" class="btn btn-secondary active">Electron Gun
Simulation</button>
<button type="button" data-scene="2" class="btn btn-secondary">Electron Microsope
simulation</button>
<!-- <button type="button" data-scene="3" class="btn btn-secondary">T.E.M. Simulation</button>
<button type="button" data-scene="4" class="btn btn-secondary">Pitfalls</button> -->
</div>
</center>
<footer>
Made with <i class="fas fa-heartbeat"></i> and <i class="fas fa-coffee"></i> by <a
href="https://github.com/xxxzeus" target="_blank">Simran Singh</a>
</footer>
</div>
</div>
</div>
</div>
<!-- **************************** hidden scenes ******************************* -->
<!-- <div id="scene-1" class="scene">
<div class="container-fluid scene-1">
<center>
<h3>Welcome to Transmission Electron Microscope Virtual Lab</h3>
</center><br><br>
<h4>What is Transmission Electron Microsocpe?</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam non sodales tortor. Fusce non enim vitae
nunc aliquet gravida. Pellentesque volutpat enim vitae eros consequat vulputate. Aliquam sed laoreet
ipsum, id dignissim ex. Duis id auctor turpis. Vivamus quis leo ac turpis sagittis ullamcorper.
Suspendisse ut libero eu diam malesuada mollis vel sit amet quam. Aenean nec pharetra ex. Aenean
consectetur, erat condimentum commodo semper, libero metus congue turpis, ac molestie quam neque ac
orci. Pellentesque eu volutpat lacus.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam non sodales tortor. Fusce non enim vitae
nunc aliquet gravida. Pellentesque volutpat enim vitae eros consequat vulputate. Aliquam sed laoreet
ipsum, id dignissim ex. Duis id auctor turpis. Vivamus quis leo ac turpis sagittis ullamcorper.
Suspendisse ut libero eu diam malesuada mollis vel sit amet quam. Aenean nec pharetra ex. Aenean
consectetur, erat condimentum commodo semper, libero metus congue turpis, ac molestie quam neque ac
orci. Pellentesque eu volutpat lacus.
</p>
<br>
<h4>Why?</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam non sodales tortor. Fusce non enim vitae
nunc aliquet gravida. Pellentesque volutpat enim vitae eros consequat vulputate. Aliquam sed laoreet
ipsum, id dignissim ex. Duis id auctor turpis. Vivamus quis leo ac turpis sagittis ullamcorper.
Suspendisse ut libero eu diam malesuada mollis vel sit amet quam. Aenean nec pharetra ex. Aenean
consectetur, erat condimentum commodo semper, libero metus congue turpis, ac molestie quam neque ac
orci. Pellentesque eu volutpat lacus.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam non sodales tortor. Fusce non enim vitae
nunc aliquet gravida. Pellentesque volutpat enim vitae eros consequat vulputate. Aliquam sed laoreet
ipsum, id dignissim ex. Duis id auctor turpis. Vivamus quis leo ac turpis sagittis ullamcorper.
Suspendisse ut libero eu diam malesuada mollis vel sit amet quam. Aenean nec pharetra ex. Aenean
consectetur, erat condimentum commodo semper, libero metus congue turpis, ac molestie quam neque ac
orci. Pellentesque eu volutpat lacus.
</p>
<button class="back but" onclick="back()">Back</button>
<button class="next but" onclick="next()">Next</button>
</div>
</div> -->
<div id="scene-1" class="scene">
<div class="container-fluid scene-2">
<canvas id="elecCanvas"></canvas>
<button class="back but" onclick="back()">Back</button>
<button class="next but" onclick="next()">Next</button>
</div>
</div>
<div id="scene-2" class="scene">
<div class="container-fluid scene-3">
<canvas id="mCanvas"></canvas>
<button class="back but" onclick="back()">Back</button>
<button class="next but" onclick="next()">Next</button>
</div>
</div>
<!-- <div id="scene-4" class="scene">
<div class="container-fluid scene-4">
<center>
<h3>Pitfalls</h3>
</center><br><br>
<button class="back but" onclick="back()">Back</button>
<button class="next but" onclick="next()">Next</button>
</div>
</div> -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
<script src="./js/oimo.js"></script>
<script src="./js/babylon.max.js"></script>
<script src="./js/main.js"></script>
</body>
</html>