-
Notifications
You must be signed in to change notification settings - Fork 3
/
TetraGeniusCell.html
584 lines (473 loc) · 14.1 KB
/
TetraGeniusCell.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
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
<!DOCTYPE html>
<html lang="en">
<head>
<title>TetraGenius: Press h to toggle menu bar : c to spin 360 : m to go full screen </title>
<meta charset="utf-8">
<meta name="description" content="Free Web Game">
<meta name="keywords" content="3D, Creative, Educational, Design, artgame, Colorful, Relaxing, Mouse only, Voxel blocks, Singleplayer, Puzzle, Experimental, Endless, Construct 2, user-interface, Feel Good, mind-bending, Visualization, Perspective">
<meta name="author" content="Theuns Dirkse-van Schalkwyk">
<meta name="sassword" content="10100010010001001000100000111010101001110010101101010010">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" href="css/style1.css" type="text/css">
<link rel="stylesheet" href="css/TetraGenius.css" type="text/css">
</head>
<body>
<p> <script> element.dispatchEvent(new KeyboardEvent('keydown', {'key':'h'} ));
element.dispatchEvent(new KeyboardEvent( 'keyup' , {'key':'h'} )); </script>
<style>
.pp {
color: lightblue;
font-size: 0.6rem;
}
.img-switcher {
width: 0px;
height: 0px;
visibility: hidden;
position: absolute;
}
.img-switcher + label {
background-image: url('/images/build.png');
width: 50px;
height: 50px;
display: block;
background-size: cover;
}
.img-switcher:checked + label {
background-image: url('/images/del.png');
}
.instruction {
position: relative;
text-align: center;
color: white;
}
/* Top right div */
.top-rightDiv {
height: 10px;
width: 100px;
right: 0;
position: fixed;
top: 20px;
}
/* Bottom left text */
.bottom-left {
position: absolute;
bottom: 8px;
left: 16px;
}
/* Top left text */
.top-left {
position: absolute;
top: 8px;
left: 16px;
}
/* Top right text */
.top-right {
position: absolute;
top: 8px;
right: 16px;
}
/* Bottom right text */
.bottom-right {
position: absolute;
bottom: 8px;
right: 16px;
}
/* Centered text */
.centered {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.wrap-collapsible {
margin-bottom: 0.2rem 0;
}
input[type='checkbox'] {
display: none;
}
.lbl-toggle {
display: block;
max-width: 100px;
font-weight: bold;
font-family: monospace;
font-size: 0.6rem;
text-transform: uppercase;
text-align: center;
padding: 0.02rem;
color: #ffff00;
background: #A1A20E;
cursor: pointer;
border-radius: 15px;
transition: all 0.25s ease-out;
}
.lbl-toggle:hover {
color: #211205;
}
.lbl-toggle::before {
content: ' ';
display: inline-block;
border-top: 0px solid transparent;
border-bottom: 0px solid transparent;
border-left: 0px solid currentColor;
vertical-align: middle;
margin-right: .1rem;
transform: translateY(-0px);
transition: transform .2s ease-out;
}
.toggle:checked + .lbl-toggle::before {
transform: rotate(90deg) translateX(-3px);
}
.collapsible-content {
max-height: 0px;
overflow: hidden;
transition: max-height .5s ease-in-out;
}
.toggle:checked + .lbl-toggle + .collapsible-content {
max-height: 700px;
}
.toggle:checked + .lbl-toggle {
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.collapsible-content .content-inner {
background: rgba(255, 255, 255, 0);
width: 100px;
border-bottom: 1px solid rgba(255, 255, 255, 0);
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
padding: 0rem 0rem;
}
.wrap-collapsible2 {
margin-bottom: 0.2rem 0;
}
input[type='checkbox'] {
display: none;
}
.lbl-toggle2 {
display: block;
max-width: 100px;
font-weight: bold;
font-family: monospace;
font-size: 0.6rem;
text-transform: uppercase;
text-align: center;
padding: 0.02rem;
color: #ffff00;
background: #A1A20E;
cursor: pointer;
border-radius: 15px;
transition: all 0.25s ease-out;
}
.lbl-toggle2:hover {
color: #211205;
}
.lbl-toggle2::before {
content: ' ';
display: inline-block;
border-top: 0px solid transparent;
border-bottom: 0px solid transparent;
border-left: 0px solid currentColor;
vertical-align: middle;
margin-right: .1rem;
transform: translateY(-0px);
transition: transform .2s ease-out;
}
.toggle2:checked + .lbl-toggle2::before {
transform: rotate(90deg) translateX(-3px);
}
.collapsible-content2 {
max-height: 0px;
overflow: hidden;
transition: max-height .5s ease-in-out;
}
.toggle2:checked + .lbl-toggle2 + .collapsible-content2 {
max-height: 700px;
}
.toggle2:checked + .lbl-toggle {
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.collapsible-content2 .content-inner2 {
background: rgba(255, 255, 255, 0);
border-bottom: 1px solid rgba(255, 255, 255, 0);
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
padding: 0rem 0rem;
}
.lbl-toggle0 {
display: block;
font-weight: bold;
font-family: monospace;
font-size: 0.9rem;
text-transform: uppercase;
text-align: center;
padding: 0.02rem;
color: #ffff00;
background: #A1A20E;
cursor: pointer;
border-radius: 10px;
transition: all 0.25s ease-out;
}
.lbl-toggle0:hover {
color: #211205;
}
.lbl-toggle0::before {
content: ' ';
display: inline-block;
border-top: 0px solid transparent;
border-bottom: 0px solid transparent;
border-left: 0px solid currentColor;
vertical-align: middle;
margin-right: .1rem;
transform: translateY(-0px);
transition: transform .2s ease-out;
}
.toggle0:checked + .lbl-toggle0::before {
transform: rotate(90deg) translateX(-3px);
}
.wrap-collapsible0 {
margin-bottom: 0.2rem 0;
}
input[type='checkbox'] {
display: none;
}
.lbl-toggle0 {
display: block;
max-width: 100px;
font-weight: bold;
font-family: monospace;
font-size: 0.6rem;
text-transform: uppercase;
text-align: center;
padding: 0.02rem;
color: #ffff00;
background: #A1A20E;
cursor: pointer;
border-radius: 15px;
transition: all 0.25s ease-out;
}
.lbl-toggle0:hover {
color: #211205;
}
.lbl-toggle0::before {
content: ' ';
display: inline-block;
border-top: 0px solid transparent;
border-bottom: 0px solid transparent;
border-left: 0px solid currentColor;
vertical-align: middle;
margin-right: .1rem;
transform: translateY(-0px);
transition: transform .2s ease-out;
}
.toggle0:checked + .lbl-toggle0::before {
transform: rotate(90deg) translateX(-3px);
}
.collapsible-content0 {
max-height: 0px;
overflow: hidden;
transition: max-height .5s ease-in-out;
}
.toggle0:checked + .lbl-toggle0 + .collapsible-content0 {
max-height: 700px;
}
.toggle0:checked + .lbl-toggle0 {
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.collapsible-content0 .content-inner0 {
background: rgba(255, 255, 255, 0);
border-bottom: 1px solid rgba(255, 255, 255, 0);
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
padding: 0rem 0rem;
}
.wrap-collapsible3 {
margin-bottom: 0.2rem 0;
max-width: 7px;
}
input[type='checkbox'] {
display: none;
}
.lbl-toggle3 {
display: block;
max-width: 100px;
font-weight: bold;
font-family: monospace;
font-size: 0.6rem;
text-transform: uppercase;
text-align: center;
padding: 0.02rem;
color: #ffff00;
background: #A1A20E;
cursor: pointer;
border-radius: 15px;
transition: all 0.25s ease-out;
}
.lbl-toggle3:hover {
color: #211205;
}
.lbl-toggle3::before {
content: ' ';
display: inline-block;
border-top: 0px solid transparent;
border-bottom: 0px solid transparent;
border-left: 0px solid currentColor;
vertical-align: middle;
margin-right: .1rem;
transform: translateY(-0px);
transition: transform .2s ease-out;
}
.toggle3:checked + .lbl-toggle3::before {
transform: rotate(90deg) translateX(-3px);
}
.collapsible-content3 {
max-height: 0px;
overflow: hidden;
transition: max-height .5s ease-in-out;
}
.toggle3:checked + .lbl-toggle3 + .collapsible-content3 {
max-height: 700px;
}
.toggle3:checked + .lbl-toggle3 {
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.collapsible-content3 .content-inner3 {
background: rgba(255, 255, 255, 0);
border-bottom: 1px solid rgba(255, 255, 255, 0);
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
padding: 0rem 0rem;
}
.glow {
font-size: 10px;
color: #000;
text-align: left;
-webkit-animation: glow 1s ease-in-out infinite alternate;
-moz-animation: glow 1s ease-in-out infinite alternate;
animation: glow 1s ease-in-out infinite alternate;
}
.glow2 {
font-size: 36px;
color: #000;
text-align: left;
-webkit-animation: glow 1s ease-in-out infinite alternate;
-moz-animation: glow 1s ease-in-out infinite alternate;
animation: glow 1s ease-in-out infinite alternate;
}
@-webkit-keyframes glow {
from {
text-shadow: 0 0 4px #fda, 0 0 6px #fda, 0 0 8px #fda, 0 0 10px #dfa, 0 0 12px #dfa, 0 0 15px #efb, 0 0 16px #ffc;
}
to {
text-shadow: 0 0 5px #ffc, 0 0 7px #ffb, 0 0 9px #ffa, 0 0 11px #efa, 0 0 13px #dfa, 0 0 15px #cfa, 0 0 17px #bfa;
}
}
</style>
<div id="header">
<div class = "top-rightDiv">
<div class="wrap-collabsible">
<input id="collapsible" class="toggle" type="checkbox" unchecked>
<label for="collapsible" class="lbl-toggle">Design type</label>
<div class="collapsible-content">
<div class="content-inner">
<h1 class="glow">Change Design type</h1>
<!--<a href="00TetraGeniusA.html">
<img src="images/Iart.png" alt="Art Designs" width="30" height="30" ></img></a><br>
<a href="00TetraGeniusE.html">
<img src="images/Iengineer.png" width="30" height="30" ></img></a><br>-->
<a href="00TetraGeniusS.html">
<img src="images/Ispace.png" width="30" height="30" ></a><br>
<!--<a href="00TetraGeniusB.html">
<img src="images/Iarchitech.png" width="30" height="30" ></img></a><br>
<a href="TetraGeniusEarth.html">
<img src="images/Iearth.png" width="30" height="30" ></img></a><br>-->
</div>
</div>
</div>
<div class="wrap-collabsible0">
<input id="collapsible0" class="toggle0" type="checkbox" unchecked>
<label for="collapsible0" class="lbl-toggle0">Instructions</label>
<div class="collapsible-content0">
<div class="content-inner0">
<div class="instruction">
<h1 class="glow" >Mouse-over faces to select (White Sphere)<br> and click to add a Tetra design element. <br>Rotate and zoom in open space.<br>Right-click deletes a Tetra.<br>If you cannot do right-click you may <br>toggle Build/Delete in the Controls below.
</h1>
</div>
<a href="http://creativecommons.org/licenses/by-nc/4.0/"><img alt="License" style="border-width:0" src="images/CCNC.png" width ="88" height="31"></a><br>
<a href="Payment.html">
<img src="images/buyMe2.png" width ="88" height="50"></img></a><br>
<a href="index.html">
<img src="images/2019LogoTss.png" width ="88" height="50"></a> <br><br>
</div>
</div>
</div>
<div class="wrap-collabsible2">
<input id="collapsible2" class="toggle2" type="checkbox" unchecked>
<label for="collapsible2" class="lbl-toggle2">Controls</label>
<div class="collapsible-content2">
<div class="content-inner2">
<h1 class="glow">Change Tetra</h1>
<img src="images/rarrow3.png" width="30" height="30" onclick="prevTetra()"></img>
<img src="images/garrow3.png" width="30" height="30" onclick="nextTetra()" ></img><br>
<h1 class="glow">Change Texture</h1>
<img src="images/rarrow4.png" width="30" height="30" onclick="prevTex()"></img>
<img src="images/garrow4.png" width="30" height="30" onclick="nextTex()" ></img><br>
<h1 class="glow">Build or Delete</h1><br>
<input id="img-switcher" onclick="deleteX()" type="checkbox"></input>
<label for="img-switcher"></label><br>
<h1 class="glow">Rotate Piece</h1>
<img src="images/RX.png" width ="22" height="22" onclick="keyboardX()" ></img>
<img src="images/RY.png" width ="22" height="22" onclick="keyboardY()" ></img>
<img src="images/RZ.png" width ="22" height="22" onclick="keyboardZ()" ></img>
</div>
</div>
</div>
<div class="wrap-collabsible3">
<input id="collapsible3" class="toggle3" type="checkbox" unchecked>
<label for="collapsible3" class="lbl-toggle3">Sponsors</label>
<div class="collapsible-content3">
<div class="content-inner3">
<a href="https://www.worldwildlife.org/"><img alt="We support them!" style="border-width:0" src="images/wwf.png" width ="100" height="128" onclick="keyboardZ()"></a><br>
<h1 class="glow">Link your business here; email to: </h1> <p class="pp">[email protected] </p>
</div>
</div>
</div>
</div>
</div>
<!-- -->
<!-- -->
<script src="js/three.min.js"></script>
<script src="js/Detector.js"></script>
<script src="js/fileSave.js"></script>
<script src="js/threex.domevent.js"></script>
<script src="js/AudioObject.js"></script>
<script src="js/loaders/OBJLoader.js"></script>
<script src="js/renderers/Projector.js"></script>
<script type='text/javascript' src='js/dat.gui.js'></script>
<script src="js/controls/TrackballControls.js"></script>
<script src="js/controls/OrthographicTrackballControls.js"></script>
<script src="js/effects/AnaglyphEffect.js"></script>
<script src="js/effects/StereoEffect.js"></script>
<script src="js/effects/OculusRiftEffect.js"></script>
<script src="js/exporters/STLExporter.js"></script>
<script src="js/exporters/OBJExporter.js"></script>
<script src="js/exporters/ObjectExporter.js"></script>
<script src="js/exporters/GeometryExporter.js"></script>
<script src="js/exporters/BufferGeometryExporter.js"></script>
<script src="js/exporters/MaterialExporter.js"></script>
<script src="js/objects/mesh.js"></script>
<script src="js/libs/OrbitControls.js"></script>
<script src="js/libs/KeyboardState.js"></script>
<script src="js/libs/THREEx.FullScreen.js"></script>
<script src="js/libs/THREEx.WindowResize.js"></script>
<script src="js/jQuery.min.js"></script>
<html>
<div id="ThreeJS" style="position: absolute; right:0px; bottom:0px"></div> <!-- Black screen background for threejs -->
<script> element.dispatchEvent(new KeyboardEvent('keydown', {'key':'h'} ));
element.dispatchEvent(new KeyboardEvent( 'keyup' , {'key':'h'} )); </script>
</p>
<script type="text/javascript" src="00Both.js"> </script>
</body>
</html>