-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
738 lines (656 loc) · 32.8 KB
/
Copy pathindex.html
File metadata and controls
738 lines (656 loc) · 32.8 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
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
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Skyden | Engineering Portfolio & 3D Workspace</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700;800&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/three@0.128.0/examples/js/controls/OrbitControls.js"></script>
<style>
:root {
--bg-void: #080c14;
--bg-panel: #0e1728;
--bg-panel-2: #101c33;
--line: #1c2c47;
--line-bright: #2c4468;
--cyan: #5eead4;
--cyan-dim: rgba(94, 234, 212, 0.15);
--amber: #ffb020;
--amber-dim: rgba(255, 176, 32, 0.15);
--danger: #ff5c5c;
--text: #c7d2e3;
--text-dim: #64769a;
--text-bright: #f3f6fb;
--font-display: 'Space Grotesk', sans-serif;
--font-body: 'Inter', sans-serif;
--font-mono: 'JetBrains Mono', monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
font-family: var(--font-body);
background-color: var(--bg-void);
background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
background-size: 42px 42px;
color: var(--text);
line-height: 1.6;
padding: 0 1.25rem 1rem;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--cyan-dim); color: var(--text-bright); }
/* ===== TOP NAVBAR ===== */
.top-navbar {
position: sticky; top: 0; z-index: 1000;
background: rgba(14, 23, 40, 0.92);
backdrop-filter: blur(8px);
border-bottom: 1px solid var(--line-bright);
margin: 0 -1.25rem 2rem -1.25rem;
padding: 0.85rem 2rem;
display: flex; justify-content: space-between; align-items: center;
}
.nav-brand {
font-family: var(--font-display); font-weight: 800; font-size: 1.2rem;
color: var(--text-bright); display: flex; align-items: center; gap: 0.5rem;
}
.nav-brand span {
color: var(--cyan); font-family: var(--font-mono); font-size: 0.75rem;
border: 1px solid var(--cyan); padding: 0.1rem 0.4rem; border-radius: 3px;
}
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a {
font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.05em;
text-transform: uppercase; color: var(--text-dim); transition: color 0.2s ease;
display: flex; align-items: center; gap: 0.3rem;
}
.nav-links a:hover, .nav-links a.active { color: var(--cyan); }
.nav-links a.active::before { content: ">"; color: var(--amber); font-weight: bold; }
/* ===== PAGE LAYOUT ===== */
.page-layout { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 240px 1fr; gap: 2rem; align-items: start; }
.sidebar-nav {
position: sticky; top: 5rem; background: var(--bg-panel);
border: 1px solid var(--line-bright); padding: 1.25rem;
display: flex; flex-direction: column; gap: 1.5rem;
}
.sidebar-section-title {
font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em;
color: var(--amber); text-transform: uppercase; border-bottom: 1px solid var(--line-bright);
padding-bottom: 0.4rem; margin-bottom: 0.75rem;
}
.sidebar-menu { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-menu a {
font-family: var(--font-mono); font-size: 0.78rem; color: var(--text);
padding: 0.4rem 0.6rem; display: block; border: 1px solid transparent; transition: all 0.2s ease;
}
.sidebar-menu a:hover, .sidebar-menu a.active { border-color: var(--cyan); background: var(--cyan-dim); color: var(--cyan); }
.sys-telemetry {
font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim);
background: var(--bg-panel-2); border: 1px solid var(--line-bright);
padding: 0.75rem; line-height: 1.5;
}
.status-online { color: var(--cyan); font-weight: bold; }
/* ===== CORNER FRAME MOTIF ===== */
.frame { position: relative; }
.frame::before, .frame::after { content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none; }
.frame::before { top: -1px; left: -1px; border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan); }
.frame::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--cyan); border-right: 2px solid var(--cyan); }
.corner-tr, .corner-bl { position: absolute; width: 14px; height: 14px; pointer-events: none; }
.corner-tr { top: -1px; right: -1px; border-top: 2px solid var(--cyan); border-right: 2px solid var(--cyan); }
.corner-bl { bottom: -1px; left: -1px; border-bottom: 2px solid var(--cyan); border-left: 2px solid var(--cyan); }
/* ===== MAIN CONTENT ===== */
header { padding: 2.5rem 2rem 0; background: var(--bg-panel); border: 1px solid var(--line-bright); margin-bottom: 2rem; }
.eyebrow { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.18em; color: var(--cyan); text-transform: uppercase; }
header h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.5rem); color: var(--text-bright); margin: 0.4rem 0 0.3rem; }
header .tagline { font-size: 1.05rem; color: var(--text-dim); font-style: italic; margin-bottom: 1.75rem; }
.title-block { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-bright); }
.title-block div { padding: 0.75rem 1rem; border-right: 1px solid var(--line-bright); }
.title-block div:last-child { border-right: none; }
.title-block .label { display: block; font-family: var(--font-mono); font-size: 0.62rem; color: var(--text-dim); text-transform: uppercase; }
.title-block .value { display: block; font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-bright); font-weight: 500; }
section { margin-bottom: 3rem; }
.sheet-eyebrow { font-family: var(--font-mono); font-size: 0.72rem; color: var(--amber); text-transform: uppercase; letter-spacing: 0.14em; }
h2 { font-family: var(--font-display); font-weight: 700; color: var(--text-bright); font-size: 1.6rem; margin: 0.35rem 0 1rem; }
.dim-line { height: 1px; background: var(--line-bright); margin-bottom: 1.5rem; }
/* 3D Viewport Box */
.viewport-box { position: relative; background: var(--bg-panel); border: 1px solid var(--line-bright); height: 480px; overflow: hidden; margin-bottom: 2rem; }
#webgl-canvas { width: 100%; height: 100%; display: block; cursor: grab; }
#webgl-canvas:active { cursor: grabbing; }
.viewport-overlay { position: absolute; top: 1rem; left: 1rem; pointer-events: none; font-family: var(--font-mono); font-size: 0.75rem; color: var(--cyan); background: rgba(8, 12, 20, 0.85); border: 1px solid var(--line-bright); padding: 0.5rem 0.8rem; }
.viewport-controls-hint { position: absolute; bottom: 1rem; right: 1rem; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); background: rgba(8, 12, 20, 0.85); border: 1px solid var(--line-bright); padding: 0.4rem 0.7rem; }
/* Grid Layouts & Cards */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.panel { background: var(--bg-panel); border: 1px solid var(--line-bright); padding: 1.5rem; }
.media-placeholder {
width: 100%; height: 200px; background: var(--bg-panel-2); border: 1px dashed var(--line-bright);
display: flex; flex-direction: column; align-items: center; justify-content: center;
color: var(--text-dim); font-family: var(--font-mono); font-size: 0.75rem; margin-bottom: 1rem; position: relative;
}
.media-placeholder::before { content: "📷 [ CAD / MEDIA PLACEHOLDER ]"; }
.media-placeholder span { font-size: 0.65rem; color: var(--amber); margin-top: 0.4rem; }
/* ===== LANDING GAME STYLES ===== */
.game-card { background: var(--bg-panel); border: 1px solid var(--line-bright); overflow: hidden; }
.game-container {
width: 100%; height: 480px; position: relative;
background: radial-gradient(circle at 50% 30%, var(--bg-panel-2) 0%, var(--bg-void) 100%);
overflow: hidden;
}
.game-container:focus { outline: none; box-shadow: inset 0 0 0 2px var(--cyan-dim); }
#game-canvas { display: block; width: 100%; height: 100%; }
.hud { position: absolute; pointer-events: none; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.04em; color: var(--cyan); text-shadow: 0 0 8px rgba(94,234,212,0.5); line-height: 1.6; }
.hud-tl { top: 14px; left: 16px; }
.hud-tr { top: 14px; right: 16px; text-align: right; }
.hud-bl { bottom: 14px; left: 16px; }
.hud .dim { color: var(--text-dim); }
.hud .danger { color: var(--danger); text-shadow: 0 0 8px rgba(255, 92, 92, 0.55); }
.game-message {
position: absolute; inset: 0;
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem;
background: rgba(8, 12, 20, 0.85); text-align: center; padding: 1.5rem;
}
.game-message.hidden { display: none; }
.game-message .message-title { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--text-bright); }
.game-message .message-title.fail { color: var(--danger); }
.game-message .message-sub { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-dim); max-width: 36ch; }
.viewer-controls {
display: flex; gap: 0.75rem; padding: 1rem 1.25rem;
background: var(--bg-panel-2); border-top: 1px solid var(--line-bright);
flex-wrap: wrap; align-items: center; justify-content: space-between;
}
.btn-group { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.control-btn {
background: transparent; border: 1px solid var(--line-bright); color: var(--text);
padding: 0.5rem 1rem; font-family: var(--font-mono); font-size: 0.72rem;
letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; transition: all 0.15s ease;
}
.control-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.control-btn.active { background: var(--cyan-dim); border-color: var(--cyan); color: var(--cyan); }
.viewer-hint { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dim); }
.btn {
display: inline-block; padding: 0.65rem 1.3rem; background: var(--cyan);
color: #04231e; font-family: var(--font-mono); font-weight: 700; font-size: 0.8rem;
letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none;
text-align: center; border: none; cursor: pointer; transition: opacity 0.15s ease;
}
.btn:hover { opacity: 0.85; }
footer { text-align: center; margin-top: 3rem; color: var(--text-dim); font-family: var(--font-mono); font-size: 0.72rem; }
@media (max-width: 900px) {
.page-layout { grid-template-columns: 1fr; }
.sidebar-nav { position: relative; top: 0; }
.title-block { grid-template-columns: repeat(2, 1fr); }
}
</style>
</head>
<body>
<!-- STICKY NAVBAR -->
<nav class="top-navbar">
<a href="index.html" class="nav-brand">SKYDEN <span>v2.0</span></a>
<ul class="nav-links">
<li><a href="index.html" class="active">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="projects.html">Projects</a></li>
<li><a href="build-logs.html">Build Logs</a></li>
</ul>
</nav>
<!-- PAGE LAYOUT -->
<div class="page-layout">
<!-- SIDEBAR DOCK -->
<aside class="sidebar-nav frame">
<span class="corner-tr"></span><span class="corner-bl"></span>
<div>
<div class="sidebar-section-title">Navigation</div>
<ul class="sidebar-menu">
<li><a href="index.html" class="active">01. Home & 3D Viewer</a></li>
<li><a href="about.html">02. About & Bio</a></li>
<li><a href="projects.html">03. CAD & Projects</a></li>
<li><a href="build-logs.html">04. Build Logs</a></li>
</ul>
</div>
<div>
<div class="sidebar-section-title">Index Sections</div>
<ul class="sidebar-menu">
<li><a href="#3d-viewport">3D Inspection Viewport</a></li>
<li><a href="#featured">Featured Hardware</a></li>
<li><a href="#quick-specs">Quick Specifications</a></li>
<li><a href="#landing-simulator">Landing Simulator</a></li>
</ul>
</div>
<div class="sys-telemetry">
<div>SYS STATUS: <span class="status-online">ONLINE</span></div>
<div>RENDERER: THREE.JS R128</div>
<div>LOCATION: BUSAN / PNW</div>
</div>
</aside>
<!-- MAIN CONTENT AREA -->
<div class="container">
<header class="frame">
<span class="corner-tr"></span><span class="corner-bl"></span>
<span class="eyebrow">AEROSPACE HARDWARE & SOFTWARE</span>
<h1>SKYDEN PORTFOLIO</h1>
<p class="tagline">3D CAD Modeling, Rapid Prototyping, and Computational Interactive Systems.</p>
<div class="title-block">
<div><span class="label">Developer</span><span class="value">Skyden</span></div>
<div><span class="label">Primary Domain</span><span class="value">Aero CAD / WebGL</span></div>
<div><span class="label">Sheet</span><span class="value">01 / 05</span></div>
<div><span class="label">Status</span><span class="value">Active Build</span></div>
</div>
</header>
<!-- 3D INTERACTIVE VIEWPORT SECTION -->
<section id="3d-viewport">
<span class="sheet-eyebrow">Interactive Module 01</span>
<h2>3D CAD Model Inspector</h2>
<div class="dim-line"></div>
<div class="viewport-box frame">
<span class="corner-tr"></span><span class="corner-bl"></span>
<div class="viewport-overlay">ASSEMBLY: AERO_TURBINE_CORE_V2.OBJ</div>
<div class="viewport-controls-hint">💡 Left-Click + Drag: Rotate | Scroll: Zoom</div>
<canvas id="webgl-canvas"></canvas>
</div>
</section>
<!-- FEATURED PROJECTS -->
<section id="featured">
<span class="sheet-eyebrow">Sheet 01B</span>
<h2>Featured Hardware Projects</h2>
<div class="dim-line"></div>
<div class="grid-2">
<div class="panel frame">
<span class="corner-tr"></span><span class="corner-bl"></span>
<div class="media-placeholder"><span>Replace with aero_vane_render.png</span></div>
<h3 style="color:var(--text-bright); font-family:var(--font-display);">High-Temp Turbine Vane CAD</h3>
<p style="font-size:0.88rem; color:var(--text-dim); margin:0.5rem 0 1rem;">Internal cooling channel geometries engineered for thermal dissipation using high-grade FDM polymers and SLA resin prints.</p>
<a href="projects.html" style="font-family:var(--font-mono); font-size:0.75rem; color:var(--cyan); border:1px solid var(--cyan); padding:0.3rem 0.6rem; display:inline-block;">View Project Details →</a>
</div>
<div class="panel frame">
<span class="corner-tr"></span><span class="corner-bl"></span>
<div class="media-placeholder"><span>Replace with drone_wing_assembly.jpg</span></div>
<h3 style="color:var(--text-bright); font-family:var(--font-display);">UAV Airfoil Modular Wing</h3>
<p style="font-size:0.88rem; color:var(--text-dim); margin:0.5rem 0 1rem;">Modular 3D-printed wing segments with internal geodesic spars for high strength-to-weight ratio in flight testing.</p>
<a href="projects.html" style="font-family:var(--font-mono); font-size:0.75rem; color:var(--cyan); border:1px solid var(--cyan); padding:0.3rem 0.6rem; display:inline-block;">View Project Details →</a>
</div>
</div>
</section>
<!-- QUICK SPECS & OVERVIEW -->
<section id="quick-specs">
<span class="sheet-eyebrow">Sheet 01C</span>
<h2>Technical Capability Summary</h2>
<div class="dim-line"></div>
<div class="grid-3">
<div class="panel frame">
<span class="corner-tr"></span><span class="corner-bl"></span>
<h4 style="color:var(--amber); font-family:var(--font-mono); margin-bottom:0.5rem;">[01] CAD & Prototyping</h4>
<p style="font-size:0.85rem; color:var(--text-dim);">Autodesk Fusion 360, SolidWorks, SLA Resin, PETG/CF FDM slicing and mechanical assembly design.</p>
</div>
<div class="panel frame">
<span class="corner-tr"></span><span class="corner-bl"></span>
<h4 style="color:var(--amber); font-family:var(--font-mono); margin-bottom:0.5rem;">[02] WebGL & Web Engine</h4>
<p style="font-size:0.85rem; color:var(--text-dim);">Interactive 3D viewports with Three.js, JavaScript graphics pipelines, and responsive blueprint UI frame architectures.</p>
</div>
<div class="panel frame">
<span class="corner-tr"></span><span class="corner-bl"></span>
<h4 style="color:var(--amber); font-family:var(--font-mono); margin-bottom:0.5rem;">[03] Leadership & Engineering</h4>
<p style="font-size:0.85rem; color:var(--text-dim);">Founder of 3D Printing Club, Bellevue High School student, international technical internship in Busan, South Korea.</p>
</div>
</div>
</section>
<!-- LANDING SEQUENCE SIMULATOR -->
<section id="landing-simulator">
<span class="sheet-eyebrow">Interactive Module 02</span>
<h2>Landing Sequence Simulator</h2>
<div class="dim-line"></div>
<div class="game-card frame">
<span class="corner-tr"></span><span class="corner-bl"></span>
<div id="game-container" class="game-container" tabindex="0">
<canvas id="game-canvas">Your browser doesn't support canvas — the landing sequence simulator needs it.</canvas>
<div class="hud hud-tl">
ALT: <span id="game-alt">0</span> m<br>
VEL: <span id="game-vel">0.0</span> m/s
</div>
<div class="hud hud-tr">
FUEL: <span id="game-fuel">100</span>%<br>
TILT: <span id="game-tilt">0</span>°
</div>
<div class="hud hud-bl">
<span class="dim">SIM: THRUST VECTOR</span>
</div>
<div id="game-message" class="game-message">
<div class="message-title" id="game-message-title">LANDING SEQUENCE SIMULATOR</div>
<div class="message-sub" id="game-message-sub">Manage thrust and tilt. Touch down inside the marked zone under 20° of tilt and safe velocity.</div>
<button class="btn" id="game-action-btn">Start sequence</button>
</div>
</div>
<div class="viewer-controls">
<div class="btn-group">
<button class="control-btn" id="btn-rotate-left">Rotate left</button>
<button class="control-btn" id="btn-thrust">Thrust</button>
<button class="control-btn" id="btn-rotate-right">Rotate right</button>
</div>
<span class="viewer-hint">←/→ TILT · ↑ OR SPACE THRUST</span>
</div>
</div>
</section>
<footer>SKYDEN — ENGINEERING PORTFOLIO · HOSTED ON GITHUB PAGES</footer>
</div>
</div>
<!-- THREE.JS 3D ENGINE SCRIPT -->
<script>
const canvas = document.getElementById('webgl-canvas');
const container = canvas.parentElement;
const scene = new THREE.Scene();
scene.background = new THREE.Color(0x0e1728);
const camera = new THREE.PerspectiveCamera(45, container.clientWidth / container.clientHeight, 0.1, 1000);
camera.position.set(20, 15, 25);
const renderer = new THREE.WebGLRenderer({ canvas: canvas, antialias: true });
renderer.setSize(container.clientWidth, container.clientHeight);
renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
const controls = new THREE.OrbitControls(camera, renderer.domElement);
controls.enableDamping = true;
controls.dampingFactor = 0.05;
// Blueprint Grid
const gridHelper = new THREE.GridHelper(40, 40, 0x5eead4, 0x1c2c47);
scene.add(gridHelper);
// Lights
const ambientLight = new THREE.AmbientLight(0xffffff, 0.6);
scene.add(ambientLight);
const dirLight = new THREE.DirectionalLight(0x5eead4, 1.2);
dirLight.position.set(10, 20, 15);
scene.add(dirLight);
// Central Blueprint Geometry Assembly
const group = new THREE.Group();
// Outer Ring Assembly
const ringGeo = new THREE.TorusGeometry(8, 0.4, 16, 100);
const ringMat = new THREE.MeshStandardMaterial({ color: 0x5eead4, wireframe: true });
const ringMesh = new THREE.Mesh(ringGeo, ringMat);
ringMesh.rotation.x = Math.PI / 2;
group.add(ringMesh);
// Inner Core Turbine Geometry
const coreGeo = new THREE.IcosahedronGeometry(4, 2);
const coreMat = new THREE.MeshStandardMaterial({ color: 0xffb020, wireframe: true });
const coreMesh = new THREE.Mesh(coreGeo, coreMat);
group.add(coreMesh);
// Vane Blades
for(let i = 0; i < 8; i++) {
const bladeGeo = new THREE.BoxGeometry(0.3, 3, 5);
const bladeMat = new THREE.MeshStandardMaterial({ color: 0x5eead4, roughness: 0.3 });
const blade = new THREE.Mesh(bladeGeo, bladeMat);
const angle = (i / 8) * Math.PI * 2;
blade.position.x = Math.cos(angle) * 6;
blade.position.z = Math.sin(angle) * 6;
blade.rotation.y = -angle;
group.add(blade);
}
scene.add(group);
// Animation Loop
function animate() {
requestAnimationFrame(animate);
group.rotation.y += 0.005;
coreMesh.rotation.x += 0.008;
controls.update();
renderer.render(scene, camera);
}
animate();
// Responsive Resize
window.addEventListener('resize', () => {
camera.aspect = container.clientWidth / container.clientHeight;
camera.updateProjectionMatrix();
renderer.setSize(container.clientWidth, container.clientHeight);
});
</script>
<!-- LANDING SEQUENCE SIMULATOR SCRIPT -->
<script>
(function () {
const container = document.getElementById('game-container');
const canvas = document.getElementById('game-canvas');
const ctx = canvas.getContext('2d');
const rootStyles = getComputedStyle(document.documentElement);
const palette = {
cyan: rootStyles.getPropertyValue('--cyan').trim() || '#5eead4',
amber: rootStyles.getPropertyValue('--amber').trim() || '#ffb020',
danger: rootStyles.getPropertyValue('--danger').trim() || '#ff5c5c',
line: rootStyles.getPropertyValue('--line').trim() || '#1c2c47',
lineBright: rootStyles.getPropertyValue('--line-bright').trim() || '#2c4468'
};
function hexToRgba(hex, alpha) {
const h = hex.replace('#', '');
const r = parseInt(h.substring(0, 2), 16);
const g = parseInt(h.substring(2, 4), 16);
const b = parseInt(h.substring(4, 6), 16);
return 'rgba(' + r + ', ' + g + ', ' + b + ', ' + alpha + ')';
}
const hudAlt = document.getElementById('game-alt');
const hudVel = document.getElementById('game-vel');
const hudFuel = document.getElementById('game-fuel');
const hudTilt = document.getElementById('game-tilt');
const overlay = document.getElementById('game-message');
const overlayTitle = document.getElementById('game-message-title');
const overlaySub = document.getElementById('game-message-sub');
const actionBtn = document.getElementById('game-action-btn');
const btnLeft = document.getElementById('btn-rotate-left');
const btnThrust = document.getElementById('btn-thrust');
const btnRight = document.getElementById('btn-rotate-right');
let W = 0, H = 0, DPR = 1;
let groundY = 0, padX0 = 0, padX1 = 0;
let craft = null, state = 'idle', lastTime = 0;
const input = { left: false, right: false, thrust: false };
const SAFE_VY_FRAC = 0.09;
const SAFE_VX_FRAC = 0.05;
const SAFE_ANGLE_DEG = 20;
const GRAVITY_FRAC = 0.055;
const THRUST_FRAC = 0.16;
const ROT_SPEED_DEG = 100;
const MAX_TILT_DEG = 60;
const FUEL_BURN = 26;
const ALT_SCALE = 1.35;
const VEL_SCALE = 0.12;
function resize() {
const rect = container.getBoundingClientRect();
W = rect.width;
H = rect.height;
DPR = Math.min(window.devicePixelRatio || 1, 2);
canvas.width = W * DPR;
canvas.height = H * DPR;
canvas.style.width = W + 'px';
canvas.style.height = H + 'px';
ctx.setTransform(DPR, 0, 0, DPR, 0, 0);
groundY = H * 0.86;
const padW = Math.max(90, W * 0.16);
padX0 = W * 0.5 - padW / 2;
padX1 = W * 0.5 + padW / 2;
if (craft) {
craft.x = Math.min(Math.max(craft.x, 20), W - 20);
} else {
resetCraft();
}
}
function resetCraft() {
craft = {
x: W * (0.35 + Math.random() * 0.3),
y: H * 0.12,
vx: (Math.random() - 0.5) * H * SAFE_VX_FRAC * 1.6,
vy: 0,
angle: (Math.random() - 0.5) * 0.35,
fuel: 100
};
}
function beginRun() {
resetCraft();
state = 'running';
overlay.classList.add('hidden');
lastTime = performance.now();
container.focus();
}
function endRun(success, title, sub) {
state = 'ended';
overlayTitle.textContent = title;
overlayTitle.classList.toggle('fail', !success);
overlaySub.textContent = sub;
actionBtn.textContent = 'Run again';
overlay.classList.remove('hidden');
}
function checkLanding() {
const speed = Math.hypot(craft.vx, craft.vy);
const angleDeg = Math.abs(craft.angle * 180 / Math.PI);
const withinPad = craft.x >= padX0 && craft.x <= padX1;
const safeVy = H * SAFE_VY_FRAC;
const safeVx = H * SAFE_VX_FRAC;
if (!withinPad) {
endRun(false, 'TOUCHDOWN OUTSIDE ZONE', 'Missed the landing zone — realign before final descent.');
return;
}
if (Math.abs(craft.vy) > safeVy || Math.abs(craft.vx) > safeVx) {
endRun(false, 'STRUCTURAL FAILURE', 'Touchdown velocity exceeded tolerance (' + (speed * VEL_SCALE).toFixed(1) + ' m/s).');
return;
}
if (angleDeg > SAFE_ANGLE_DEG) {
endRun(false, 'STRUCTURAL FAILURE', 'Touchdown angle exceeded tolerance (' + angleDeg.toFixed(0) + '° off vertical).');
return;
}
const precise = speed < safeVy * 0.4 && angleDeg < 6;
endRun(true, precise ? 'PRECISION LANDING' : 'SEQUENCE COMPLETE', 'Landed safely — ' + Math.round(craft.fuel) + '% fuel remaining.');
}
function update(dt) {
if (state !== 'running') return;
const rot = ROT_SPEED_DEG * Math.PI / 180;
if (input.left) craft.angle -= rot * dt;
if (input.right) craft.angle += rot * dt;
const maxTilt = MAX_TILT_DEG * Math.PI / 180;
craft.angle = Math.max(-maxTilt, Math.min(maxTilt, craft.angle));
craft.vy += H * GRAVITY_FRAC * dt;
if (input.thrust && craft.fuel > 0) {
const thrust = H * THRUST_FRAC;
craft.vx += Math.sin(craft.angle) * thrust * dt;
craft.vy -= Math.cos(craft.angle) * thrust * dt;
craft.fuel = Math.max(0, craft.fuel - FUEL_BURN * dt);
}
craft.x += craft.vx * dt;
craft.y += craft.vy * dt;
const margin = 20;
if (craft.x < margin) { craft.x = margin; craft.vx = Math.abs(craft.vx) * 0.3; }
if (craft.x > W - margin) { craft.x = W - margin; craft.vx = -Math.abs(craft.vx) * 0.3; }
const craftHalfH = Math.max(28, H * 0.085) * 0.5;
if (craft.y + craftHalfH >= groundY) {
craft.y = groundY - craftHalfH;
checkLanding();
}
hudAlt.textContent = Math.max(0, Math.round((groundY - craft.y) * ALT_SCALE));
hudVel.textContent = (Math.hypot(craft.vx, craft.vy) * VEL_SCALE).toFixed(1);
hudVel.classList.toggle('danger', Math.abs(craft.vy) > H * SAFE_VY_FRAC || Math.abs(craft.vx) > H * SAFE_VX_FRAC);
hudFuel.textContent = Math.round(craft.fuel);
hudFuel.classList.toggle('danger', craft.fuel < 20);
const tiltDeg = craft.angle * 180 / Math.PI;
hudTilt.textContent = tiltDeg.toFixed(0);
hudTilt.classList.toggle('danger', Math.abs(tiltDeg) > SAFE_ANGLE_DEG);
}
function drawGround() {
ctx.strokeStyle = palette.lineBright;
ctx.lineWidth = 1;
ctx.beginPath();
ctx.moveTo(0, groundY);
ctx.lineTo(W, groundY);
ctx.stroke();
ctx.strokeStyle = palette.line;
for (let x = 0; x < W; x += 28) {
ctx.beginPath();
ctx.moveTo(x, groundY);
ctx.lineTo(x, groundY + 6);
ctx.stroke();
}
ctx.strokeStyle = palette.cyan;
ctx.lineWidth = 2;
ctx.beginPath();
ctx.moveTo(padX0, groundY);
ctx.lineTo(padX1, groundY);
ctx.stroke();
const tick = 7;
ctx.beginPath();
ctx.moveTo(padX0, groundY - tick); ctx.lineTo(padX0, groundY + tick);
ctx.moveTo(padX1, groundY - tick); ctx.lineTo(padX1, groundY + tick);
ctx.stroke();
ctx.fillStyle = palette.cyan;
ctx.font = "10px 'JetBrains Mono', monospace";
ctx.textAlign = 'center';
ctx.fillText('LZ', (padX0 + padX1) / 2, groundY + 20);
}
function drawCraft() {
const w = Math.max(16, H * 0.045);
const h = Math.max(28, H * 0.085);
ctx.save();
ctx.translate(craft.x, craft.y);
ctx.rotate(craft.angle);
if (input.thrust && craft.fuel > 0 && state === 'running') {
const flicker = 0.6 + Math.random() * 0.4;
ctx.beginPath();
ctx.moveTo(-w * 0.28, h * 0.5);
ctx.lineTo(0, h * 0.5 + h * 0.55 * flicker);
ctx.lineTo(w * 0.28, h * 0.5);
ctx.closePath();
ctx.fillStyle = palette.amber;
ctx.globalAlpha = 0.85;
ctx.fill();
ctx.globalAlpha = 1;
}
ctx.beginPath();
ctx.moveTo(0, -h * 0.5);
ctx.lineTo(w * 0.5, h * 0.35);
ctx.lineTo(w * 0.22, h * 0.5);
ctx.lineTo(-w * 0.22, h * 0.5);
ctx.lineTo(-w * 0.5, h * 0.35);
ctx.closePath();
ctx.fillStyle = hexToRgba(palette.cyan, 0.16);
ctx.fill();
ctx.strokeStyle = palette.cyan;
ctx.lineWidth = 2;
ctx.stroke();
ctx.restore();
}
function draw() {
ctx.clearRect(0, 0, W, H);
drawGround();
if (craft) drawCraft();
}
function loop(now) {
const dt = Math.min((now - lastTime) / 1000, 0.05);
lastTime = now;
update(dt);
draw();
requestAnimationFrame(loop);
}
function setInput(key, val) {
if (key === 'left') input.left = val;
if (key === 'right') input.right = val;
if (key === 'thrust') input.thrust = val;
}
container.addEventListener('keydown', (e) => {
const c = e.code;
if (['ArrowLeft', 'ArrowRight', 'ArrowUp', 'Space', 'KeyA', 'KeyD', 'KeyW'].includes(c)) e.preventDefault();
if (c === 'ArrowLeft' || c === 'KeyA') setInput('left', true);
if (c === 'ArrowRight' || c === 'KeyD') setInput('right', true);
if (c === 'ArrowUp' || c === 'KeyW' || c === 'Space') setInput('thrust', true);
});
container.addEventListener('keyup', (e) => {
const c = e.code;
if (c === 'ArrowLeft' || c === 'KeyA') setInput('left', false);
if (c === 'ArrowRight' || c === 'KeyD') setInput('right', false);
if (c === 'ArrowUp' || c === 'KeyW' || c === 'Space') setInput('thrust', false);
});
function bindHold(el, key) {
const on = (e) => { e.preventDefault(); setInput(key, true); };
const off = () => { setInput(key, false); };
el.addEventListener('mousedown', on);
el.addEventListener('touchstart', on, { passive: false });
el.addEventListener('contextmenu', (e) => e.preventDefault());
['mouseup', 'mouseleave', 'touchend', 'touchcancel'].forEach((ev) => el.addEventListener(ev, off));
}
bindHold(btnLeft, 'left');
bindHold(btnThrust, 'thrust');
bindHold(btnRight, 'right');
actionBtn.addEventListener('click', beginRun);
window.addEventListener('resize', resize);
resize();
lastTime = performance.now();
requestAnimationFrame(loop);
})();
</script>
</body>
</html>