-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
3987 lines (3634 loc) · 245 KB
/
index.html
File metadata and controls
3987 lines (3634 loc) · 245 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
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Alien Computer: Retro Sci-Fi Dashboard Terminal Emulator</title>
<meta name="description" content="Experience an interactive, randomized retro sci-fi dashboard with an alien aesthetic, 50 panel types, 51 'Tetris-like' static layouts filling the entire browser window, with significantly improved performance and robustly filled glyph-only content.">
<meta name="keywords" content="retro, sci-fi, dashboard, alien, interactive, crt, generative, procedural, interface, computer screen, tetris layout, 50 panels, 50 layouts, static display, glyphs only, full panels, no overlap, optimized, performance, revamped">
<meta name="author" content="Chris Pirillo">
<meta property="og:title" content="Alien Computer: Retro Sci-Fi Dashboard Terminal Emulator">
<meta property="og:description" content="Interactive, randomized retro sci-fi dashboard with 50 panel types, 51 'Tetris-like' static layouts filling the entire browser window, with significantly improved performance and robustly filled glyph-only content.">
<meta property="og:type" content="website">
<meta property="og:image" content="https://pirillo.com/arcade/images/alien-computer.png">
<meta property="og:url" content="https://pirillo.com/arcade/alien-computer.html">
<meta property="og:image:alt" content="A retro sci-fi computer dashboard with alien glyphs, 50 panel types and varied panel sizes in a static layout, using only glyphs, with robustly filled content and optimized performance.">
<link rel="canonical" href="https://pirillo.com/arcade/alien-computer.html">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Alien Computer: Retro Sci-Fi Dashboard Terminal Emulator">
<meta name="twitter:description" content="Interactive, randomized retro sci-fi dashboard with 50 panel types, 50 static layouts, and optimized performance.">
<meta name="twitter:image" content="https://pirillo.com/arcade/images/alien-computer.png">
<meta name="theme-color" content="#000000">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "Alien Computer: Retro Sci-Fi Dashboard Terminal Emulator",
"description": "Experience an interactive, randomized retro sci-fi dashboard with an alien aesthetic, 50 panel types, 51 complex 'Tetris-like' static layouts filling the entire browser window, with optimized performance and robustly filled glyph-only content.",
"applicationCategory": "Entertainment",
"operatingSystem": "Any (Web Browser)",
"browserRequirements": "Requires HTML5, CSS3, and JavaScript.",
"image": "https://pirillo.com/arcade/images/alien-computer.png",
"url": "https://pirillo.com/arcade/alien-computer.html",
"keywords": "retro, sci-fi, dashboard, alien, interactive, crt, generative, interface, tetris layout, 50 panels, static, glyphs only, full content, no overlap, optimized, performance, revamped",
"author": {
"@type": "Organization",
"name": "AI Enhanced"
},
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "USD"
}
}
</script>
<script src="https://cdn.tailwindcss.com"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500&display=swap');
:root {
--base-phosphor-color: #FFB000; /* Default Amber */
--base-phosphor-color-rgb: 255,176,0;
--primary-text-color: var(--base-phosphor-color);
--panel-border-color: rgba(var(--base-phosphor-color-rgb), 0.4);
--panel-title-color: rgba(var(--base-phosphor-color-rgb), 0.9);
--panel-title-border-color: rgba(var(--base-phosphor-color-rgb), 0.25);
--panel-glow-color-strong: rgba(var(--base-phosphor-color-rgb), 0.5);
--panel-glow-color-subtle: rgba(var(--base-phosphor-color-rgb), 0.15);
--main-container-border-color: rgba(var(--base-phosphor-color-rgb), 0.3);
--main-container-glow-color: rgba(var(--base-phosphor-color-rgb), 0.25);
--alert-text-color: var(--base-phosphor-color);
--alert-border-color: rgba(var(--base-phosphor-color-rgb), 0.5);
--alert-title-border-color: rgba(var(--base-phosphor-color-rgb), 0.35);
--alert-glow-color: rgba(var(--base-phosphor-color-rgb), 0.7);
--status-dot-active-color: var(--base-phosphor-color);
--status-dot-off-bg: rgba(var(--base-phosphor-color-rgb), 0.1);
--status-dot-off-shadow: rgba(var(--base-phosphor-color-rgb), 0.05);
--button-active-bg: rgba(var(--base-phosphor-color-rgb), 0.4);
--button-active-shadow: var(--primary-text-color);
--button-default-bg: rgba(var(--base-phosphor-color-rgb), 0.1);
--button-default-border: rgba(var(--base-phosphor-color-rgb), 0.3);
}
html, body {
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
body {
font-family: 'Roboto Mono', monospace, sans-serif; background-color: #000000;
color: var(--primary-text-color); display: flex; justify-content: center;
align-items: center;
}
#dashboardRoot {
width: 100vw;
height: 100vh;
background-color: #020202;
border: 1px solid var(--main-container-border-color);
border-radius: 0;
box-shadow: 0 0 20px var(--main-container-glow-color), inset 0 0 10px rgba(0,0,0,0.7);
display: grid; /* CRITICAL: Must be grid from the start for grid-area to work! */
gap: 2px;
padding: 2px;
overflow: hidden; position: relative;
filter: blur(0.2px);
visibility: hidden; /* Use visibility instead of display:none to prevent FOUC while keeping grid layout active */
}
#dashboardRoot::before {
content: ""; position: absolute; top: 0; left: 0; right:0; bottom:0;
background-image:
repeating-linear-gradient(
transparent 0px,
rgba(var(--base-phosphor-color-rgb), 0.08) 1px,
rgba(var(--base-phosphor-color-rgb), 0.15) 2px,
rgba(var(--base-phosphor-color-rgb), 0.08) 3px,
transparent 4px
),
radial-gradient(ellipse at center, rgba(0,0,0,0) 65%, rgba(0,0,0,0.3) 100%);
pointer-events: none; z-index: 10;
border-radius: 0;
opacity: 0.95;
animation: crtFlicker 0.12s infinite alternate;
}
@keyframes crtFlicker {
0% { opacity: 0.90; }
100% { opacity: 0.95; }
}
.panel {
background-color: #000000; border: 1px solid var(--panel-border-color);
border-radius: 3px;
padding: 4px 6px;
overflow: hidden;
box-shadow: inset 0 0 6px var(--panel-glow-color-subtle);
display: flex; flex-direction: column;
min-width: 0; min-height: 0;
}
.panel-title {
font-size: 0.7rem;
font-weight: 500; color: var(--panel-title-color);
margin-bottom: 3px; border-bottom: 1px solid var(--panel-title-border-color);
padding-bottom: 2px; text-shadow: 0 0 3px var(--panel-glow-color-strong);
line-height: 1.2; display: flex; flex-wrap: wrap;
align-items: center; gap: 1px;
min-height: 1.3em; flex-shrink: 0;
overflow: hidden;
}
.panel.alert-type { background-color: rgba(var(--base-phosphor-color-rgb), 0.05); border-color: var(--alert-border-color); }
.panel.alert-type .panel-title { color: var(--alert-text-color); border-bottom-color: var(--alert-title-border-color); }
.panel.alert-type .panel-title .alien-glyph, .panel.alert-type .alert-message-content .alien-glyph { color: var(--alert-text-color); }
.main-display-canvas, .waveform-canvas, .gauge-canvas, .heatmap-canvas, .circlegraph-canvas, .wireframe-canvas, .scanner-canvas,
.orbital-path-canvas, .frequency-spectrum-canvas, .energy-flow-canvas, .targeting-reticule-canvas, .starmap-canvas, .pulse-wave-canvas,
.network-topology-canvas, .circular-progress-canvas,
.logarithmic-spiral-canvas, .radar-sweep-canvas, .horizontal-spectrum-canvas,
.globe-projection-canvas, .data-flow-chart-canvas, .particle-collision-canvas,
.glyph-constellation-canvas, .bio-rhythm-canvas, .hex-grid-canvas, .nav-vector-canvas, .energy-core-pulse-canvas,
.dot-matrix-canvas, .quantum-entanglement-canvas /* Added for the new panel */ {
width: 100%;
flex-grow: 1;
min-height: 40px;
background-color: rgba(var(--base-phosphor-color-rgb), 0.02);
border-radius: 2px;
margin-top: 3px;
}
.status-item, .nav-item-like, .diag-item, .target-item-line, .system-log-entry {
margin-bottom: 2px; display: flex; justify-content: space-between; align-items: flex-start;
line-height: 1.2; min-height: 1.2em; cursor: default; font-size: 0.8rem;
}
.target-item-line { cursor: pointer; transition: background-color 0.2s; }
.target-item-line:hover { background-color: rgba(var(--base-phosphor-color-rgb), 0.1); }
.target-item-line.selected { background-color: rgba(var(--base-phosphor-color-rgb), 0.2); box-shadow: 0 0 5px var(--primary-text-color) inset; }
.diag-item > span:first-child { cursor: pointer; }
.diag-item > span:first-child:hover { text-shadow: 0 0 5px var(--primary-text-color); }
.status-item > span, .nav-item-like > span, .diag-item > span, .target-item-line > span, .system-log-entry > span {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.status-item > span:first-child, .nav-item-like > span:first-child, .diag-item > span:first-child, .target-item-line > span:first-child, .system-log-entry > span:first-child {
color: var(--panel-title-color); flex-basis: 40%; flex-shrink: 0; display: flex; gap: 1px; align-items: center;
}
.status-item > span:last-child, .nav-item-like > span:last-child, .diag-item > span:last-child, .target-item-line > span:last-child, .system-log-entry > span:last-child {
color: var(--primary-text-color); flex-basis: 58%; flex-shrink: 1; text-align: right; display: flex; justify-content: flex-end; gap: 1px;
}
.status-dot {
width: 0.4em; height: 0.4em; border-radius: 50%; margin-right: 3px; display: inline-block;
background-color: var(--status-dot-off-bg); box-shadow: 0 0 2px var(--status-dot-off-shadow);
transition: background-color 0.3s, box-shadow 0.3s;
}
.status-dot.active { background-color: var(--status-dot-active-color); box-shadow: 0 0 4px var(--status-dot-active-color), 0 0 2px var(--status-dot-active-color) inset; }
.blinking .alien-glyph, .blinking .status-dot.active { animation: blink-svg 1s infinite; }
.blinking-fast .alien-glyph, .blinking-fast .status-dot.active { animation: blink-svg 0.5s infinite; }
@keyframes blink-svg { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.data-stream, .comms-log-content, .diag-list-content, .target-list-content, .code-scroll-content, .text-block-content,
.glyph-matrix-content, .system-log-content, .data-packet-content, .security-access-content, .text-scroller-content,
.binary-stream-content, .dna-sequence-content,
.data-barcode-content, .status-light-array-content, .encrypted-transmission-content, .glyph-waterfall-content {
line-height: 1.15; white-space: pre-wrap; overflow-y: auto; flex-grow: 1; color: var(--primary-text-color); word-break: break-all;
font-size: 0.85rem;
-ms-overflow-style: none; scrollbar-width: none;
}
.data-stream::-webkit-scrollbar, .comms-log-content::-webkit-scrollbar, .diag-list-content::-webkit-scrollbar, .target-list-content::-webkit-scrollbar, .code-scroll-content::-webkit-scrollbar, .text-block-content::-webkit-scrollbar,
.glyph-matrix-content::-webkit-scrollbar, .system-log-content::-webkit-scrollbar, .data-packet-content::-webkit-scrollbar, .security-access-content::-webkit-scrollbar, .text-scroller-content::-webkit-scrollbar,
.binary-stream-content::-webkit-scrollbar, .dna-sequence-content::-webkit-scrollbar,
.data-barcode-content::-webkit-scrollbar, .status-light-array-content::-webkit-scrollbar, .encrypted-transmission-content::-webkit-scrollbar, .glyph-waterfall-content::-webkit-scrollbar { display: none; }
.data-stream .alien-line, .comms-log-content .alien-line, .diag-list-content .alien-line, .target-list-content .alien-line, .code-scroll-content .alien-line, .text-block-content .alien-line,
.system-log-content .alien-line, .data-packet-content .alien-line, .security-access-content .alien-line, .text-scroller-content .alien-line,
.binary-stream-content .alien-line, .dna-sequence-content .alien-line,
.data-barcode-content .alien-line, .encrypted-transmission-content .alien-line, .glyph-waterfall-content .alien-line { display: flex; gap: 1px; margin-bottom: 0px;}
.comms-log-content, .diag-list-content, .target-list-content, .code-scroll-content, .data-stream, .text-block-content,
.glyph-matrix-content, .system-log-content, .data-packet-content, .security-access-content, .text-scroller-content,
.binary-stream-content, .dna-sequence-content,
.data-barcode-content, .status-light-array-content, .encrypted-transmission-content, .glyph-waterfall-content { max-height: none; }
.signal-bars-container { margin-top: 4px; display: flex; gap: 1px; align-items: flex-end; height: 100%; flex-grow:1; min-height:20px; }
.signal-bar { width: 18%; background-color: var(--panel-title-color); transition: height 0.3s ease-out; box-shadow: 0 0 2px var(--panel-title-color);}
.alert-message-content { font-weight: 700; text-align: center; text-shadow: 0 0 5px var(--alert-glow-color), 0 0 10px var(--alert-glow-color); animation: pulse-alert 1.5s infinite ease-in-out; line-height: 1.3; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 2px; flex-grow: 1;}
@keyframes pulse-alert { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.03); opacity: 0.75; } }
.alien-glyph { width: 0.75em; height: 0.75em; display: inline-block; vertical-align: middle; fill: currentColor; }
.panel-title .alien-glyph {width: 0.8em; height: 0.8em;}
.numeric-readout-panel .alien-glyph { width: 1.4em; height: 1.4em; margin: 0 1px;}
.alert-message-content .alien-glyph { width: 1.0em; height: 1.0em; }
.text-scroller-line .alien-glyph { width: 1.3em; height: 1.3em; }
.binary-stream-content .alien-glyph { width: 0.7em; height: 0.7em; opacity: 0.8; margin: 0 0.5px;}
.dna-sequence-content .alien-glyph { width: 0.8em; height: 0.8em; margin: 0 0.5px; }
.data-barcode-strip .alien-glyph { margin: 0; }
.status-light-array-content .status-dot { margin: 1px; width: 0.6em; height: 0.6em; }
.glyph-waterfall-column .alien-glyph { display: block; margin-bottom: 1px; }
.progress-bar-container { width: 100%; height: 0.5em; background-color: rgba(var(--base-phosphor-color-rgb), 0.1); border-radius: 2px; overflow: hidden; margin-top: 2px;}
.progress-bar-fill { height: 100%; background-color: var(--primary-text-color); width: 0%; transition: width 0.5s ease-out; box-shadow: 0 0 3px var(--primary-text-color);}
.button-grid, .keypad-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(30px, 1fr)); grid-auto-rows: 1fr; gap: 3px; margin-top: 4px; flex-grow: 1; align-content: stretch; height: 100%;}
.static-button, .keypad-button {
background-color: var(--button-default-bg); border: 1px solid var(--button-default-border);
padding: 3px; border-radius: 2px; display: flex; flex-direction: column; align-items: center; justify-content: center;
min-height: 25px; cursor: pointer; transition: background-color 0.1s, box-shadow 0.1s;
height: 100%;
}
.static-button:hover, .keypad-button:hover { background-color: rgba(var(--base-phosphor-color-rgb), 0.2); }
.static-button.active, .keypad-button.active { background-color: var(--button-active-bg); box-shadow: 0 0 5px var(--button-active-shadow); border-color: var(--button-active-shadow); }
.static-button .alien-glyph { width: 0.65em; height: 0.65em; }
.keypad-button { min-height: 22px; padding: 4px; }
.keypad-button .alien-glyph { width: 0.9em; height: 0.9em; }
.system-tree-node { margin-left: 8px; padding-left: 8px; border-left: 1px dashed rgba(var(--base-phosphor-color-rgb), 0.3); margin-bottom: 1px;}
.system-tree-node .alien-line { margin-bottom: 0;}
.code-scroll-content .alien-line { font-size: 0.85em; }
.code-scroll-content .indent-1 { padding-left: 0.8em; } .code-scroll-content .indent-2 { padding-left: 1.6em; }
.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(1.5em, 1fr)); gap: 2px; flex-grow: 1; align-content: flex-start; padding-top: 5px;}
.status-grid-cell { width: 1.2em; height: 1.2em; border: 1px solid rgba(var(--base-phosphor-color-rgb), 0.2); display: flex; justify-content: center; align-items: center;}
.status-grid-cell .alien-glyph { width: 0.7em; height: 0.7em;}
.text-block-content .alien-glyph { margin: 0 0.5px; }
.sequence-scanner-content { display: flex; flex-direction: column; gap: 1px; flex-grow: 1; overflow: hidden; position:relative; }
.sequence-scanner-line { display: flex; align-items: center; position: relative; min-height: 1.1em; }
.scanner-bar { position: absolute; left: 0; top:0; bottom:0; background-color: rgba(var(--base-phosphor-color-rgb),0.4); animation: scan 3s linear infinite; }
@keyframes scan { 0% { width: 0%; left: 0%;} 45% { width: 10%; left: 0%;} 50% { width: 10%; left: 90%;} 55% { width: 10%; left: 0%;} 100% { width: 0%; left: 0%;} }
.glyph-matrix-content { display: grid; grid-template-columns: repeat(auto-fill, minmax(1em, 1fr)); gap: 2px; align-content: flex-start; padding: 2px; }
.glyph-matrix-cell { width: 1em; height: 1em; display: flex; justify-content: center; align-items: center; }
.glyph-matrix-cell .alien-glyph { width: 1em; height: 1em; }
.data-packet { background-color: rgba(var(--base-phosphor-color-rgb), 0.1); border: 1px solid rgba(var(--base-phosphor-color-rgb), 0.2); border-radius: 2px; padding: 1px 3px; margin-bottom: 2px; display: inline-flex; gap: 1px; font-size: 0.9em;}
.security-access-content { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.security-status-line { margin-top: 5px; font-weight: bold; }
.text-scroller-content { overflow: hidden; white-space: nowrap; }
.text-scroller-line { display: inline-block; animation: scroll-text 20s linear infinite; }
@keyframes scroll-text { 0% { transform: translateX(5%); } 100% { transform: translateX(-100%); } }
.dna-sequence-content .dna-pair { display: inline-flex; flex-direction: column; align-items: center; margin: 0 1px; }
.dna-sequence-content .dna-connector { width:1px; height: 5px; background-color: rgba(var(--base-phosphor-color-rgb),0.3); margin: 1px 0;}
.data-barcode-content { display: flex; flex-direction: column; gap: 2px; }
.data-barcode-strip { display: flex; align-items: flex-end; height: 1.2em; }
.status-light-array-content { display: grid; grid-template-columns: repeat(auto-fill, minmax(0.8em, 1fr)); gap: 1px; align-content: flex-start; padding: 2px;}
.glyph-waterfall-content { display: flex; justify-content: space-around; overflow: hidden; }
.glyph-waterfall-column { line-height: 1; animation: fall 5s linear infinite; }
@keyframes fall { 0% { transform: translateY(-100%); opacity: 0; } 10% { opacity: 1;} 90% { opacity: 1;} 100% { transform: translateY(100%); opacity: 0;} }
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script></head>
<body>
<svg width="0" height="0" style="position:absolute;visibility:hidden;">
<symbol id="g1" viewBox="0 0 10 10"><path d="M2 1 V9 M1 2 H3 M1 8 H3" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g2" viewBox="0 0 10 10"><path d="M5 1 V9 M2 5 H8" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g3" viewBox="0 0 10 10"><path d="M2 1 H8 V3 H2Z M2 7 H8 V9 H2Z M5 3 V7" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g4" viewBox="0 0 10 10"><path d="M2 1 V9 L8 5 Z" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g5" viewBox="0 0 10 10"><path d="M2 1 H8 M2 9 H8 M2 5 H5 L8 2 M8 8 L5 5" stroke="currentColor" stroke-width="1" fill="none"/></symbol> <symbol id="g6" viewBox="0 0 10 10"><path d="M5 1 V5 M1 5 H9 M5 5 V9" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g7" viewBox="0 0 10 10"><circle cx="5" cy="3" r="2" stroke="currentColor" stroke-width="1" fill="none"/><path d="M5 5 V9 M3 9 H7" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g8" viewBox="0 0 10 10"><path d="M2 1 V9 M8 1 V9 M2 5 H8" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g9" viewBox="0 0 10 10"><path d="M5 1 V9" stroke="currentColor" stroke-width="1.5" fill="none"/></symbol> <symbol id="g10" viewBox="0 0 10 10"><path d="M8 1 V9 M2 9 H8" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g11" viewBox="0 0 10 10"><path d="M2 1 V9 M2 5 L8 1 M2 5 L8 9" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g12" viewBox="0 0 10 10"><path d="M2 1 V9 H8" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g13" viewBox="0 0 10 10"><path d="M1 9 L3 1 L5 9 L7 1 L9 9" stroke="currentColor" stroke-width="1" fill="none"/></symbol> <symbol id="g14" viewBox="0 0 10 10"><path d="M2 9 L2 1 L8 9 L8 1" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g15" viewBox="0 0 10 10"><circle cx="5" cy="5" r="4" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g16" viewBox="0 0 10 10"><path d="M2 1 V9 H8 V5 H2" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g17" viewBox="0 0 10 10"><circle cx="5" cy="5" r="4" stroke="currentColor" stroke-width="1.2" fill="none"/><line x1="5" y1="5" x2="8" y2="8" stroke="currentColor" stroke-width="1"/></symbol> <symbol id="g18" viewBox="0 0 10 10"><path d="M2 1 V9 H8 V5 H5 L8 1" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g19" viewBox="0 0 10 10"><path d="M8 1 H2 V5 H8 V9 H2" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g20" viewBox="0 0 10 10"><path d="M1 1 H9 M5 1 V9" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g21" viewBox="0 0 10 10"><path d="M2 1 V7 L8 7 L8 1" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g22" viewBox="0 0 10 10"><path d="M1 1 L5 9 L9 1" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g23" viewBox="0 0 10 10"><path d="M1 1 L3 9 L5 1 L7 9 L9 1" stroke="currentColor" stroke-width="1" fill="none"/></symbol> <symbol id="g24" viewBox="0 0 10 10"><path d="M1 1 L9 9 M9 1 L1 9" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g25" viewBox="0 0 10 10"><path d="M1 1 L5 5 M9 1 L5 5 M5 5 V9" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g26" viewBox="0 0 10 10"><path d="M1 1 H9 L1 9 H9" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g27" viewBox="0 0 10 10"><path d="M3 1 V9 M7 1 V9 M1 5 H9" stroke="currentColor" stroke-width="1" fill="none"/></symbol> <symbol id="g28" viewBox="0 0 10 10"><rect x="2" y="2" width="6" height="6" stroke="currentColor" stroke-width="1" fill="none"/><circle cx="5" cy="5" r="1.5" fill="currentColor"/></symbol> <symbol id="g29" viewBox="0 0 10 10"><path d="M1 5 H5 L9 1 M1 5 H5 L9 9" stroke="currentColor" stroke-width="1.2" fill="none"/></symbol> <symbol id="g30" viewBox="0 0 10 10"><path d="M5 1 L5 3 M5 7 L5 9 M1 5 L3 5 M7 5 L9 5 M3 3 L7 3 L7 7 L3 7 Z" stroke="currentColor" stroke-width="1" fill="none"/></symbol> </svg>
<div id="dashboardRoot">
</div>
<script>
// --- Global flag to prevent concurrent dashboard builds ---
let isBuildingDashboard = false;
// --- Core Alien Glyph and Utility Functions ---
const alienGlyphIds = Array.from({length: 30}, (_, i) => `g${i + 1}`);
const binaryGlyphZero = alienGlyphIds[0];
const binaryGlyphOne = alienGlyphIds[1];
// Map of symbol ID to innerHTML content (paths)
const symbolContent = {};
function cacheSymbolContent() {
const symbols = document.querySelectorAll('symbol');
symbols.forEach(sym => {
symbolContent[sym.id] = sym.innerHTML;
// Also get viewbox
const vb = sym.getAttribute('viewBox') || '0 0 10 10';
symbolContent[sym.id + '_vb'] = vb;
});
}
// Call this early
window.addEventListener('DOMContentLoaded', cacheSymbolContent);
function createAlienGlyphSVG(glyphId) {
const svgNS = "http://www.w3.org/2000/svg";
const svg = document.createElementNS(svgNS, "svg");
svg.setAttribute("class", "alien-glyph");
// Inlined content for robust export
if (symbolContent[glyphId]) {
svg.innerHTML = symbolContent[glyphId];
const vb = symbolContent[glyphId + '_vb'];
if (vb) svg.setAttribute("viewBox", vb);
} else {
// Fallback if not cached yet (shouldn't happen with correct ordering)
const use = document.createElementNS(svgNS, "use");
use.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#" + glyphId);
svg.appendChild(use);
}
return svg;
}
function generateAlienSVGSequence(length, targetElement, isBlinking = false, isBlinkingFast = false) {
if (!targetElement) return;
targetElement.innerHTML = '';
const parentFontSize = parseFloat(getComputedStyle(targetElement.parentElement || document.body).fontSize) || 16;
let approxGlyphWidthPx = 0.75 * parentFontSize * 0.50;
if (targetElement.classList.contains('panel-title')) approxGlyphWidthPx = 0.8 * parentFontSize * 0.50;
else if (targetElement.classList.contains('numeric-readout-line')) approxGlyphWidthPx = 1.4 * parentFontSize * 0.50;
else if (targetElement.classList.contains('alert-message-content')) approxGlyphWidthPx = 1.0 * parentFontSize * 0.50;
let availableWidthPx = targetElement.clientWidth;
if (!availableWidthPx || availableWidthPx < 10) {
if (targetElement.parentElement) availableWidthPx = targetElement.parentElement.clientWidth * 0.80;
if (!availableWidthPx || availableWidthPx < 10) availableWidthPx = 80;
}
const maxGlyphsPerLine = approxGlyphWidthPx > 0 ? Math.max(1, Math.floor(availableWidthPx / approxGlyphWidthPx)) : 12;
const finalLength = Math.min(length, maxGlyphsPerLine);
for (let i = 0; i < finalLength; i++) {
let glyphIdToUse = alienGlyphIds[Math.floor(Math.random() * alienGlyphIds.length)];
if (targetElement.classList.contains('binary-stream-content') || targetElement.classList.contains('binary-line') || targetElement.classList.contains('data-barcode-strip')) {
glyphIdToUse = Math.random() < 0.5 ? binaryGlyphZero : binaryGlyphOne;
}
const svgGlyph = createAlienGlyphSVG(glyphIdToUse);
if (isBlinking) svgGlyph.classList.add('blinking');
if (isBlinkingFast) svgGlyph.classList.add('blinking-fast');
targetElement.appendChild(svgGlyph);
}
}
function generateAlienSVGLine(length, parentWidth = 250, isBinary = false) {
const lineDiv = document.createElement('div');
lineDiv.className = 'alien-line';
if(isBinary) lineDiv.classList.add('binary-line');
const approxGlyphWidthPx = 0.75 * (parseFloat(getComputedStyle(document.body).fontSize) || 16) * 0.50;
const targetGlyphCount = Math.min(length, parentWidth > 0 && approxGlyphWidthPx > 0 ? Math.floor(parentWidth / approxGlyphWidthPx) : length);
generateAlienSVGSequence(targetGlyphCount, lineDiv);
return lineDiv;
}
function debounce(func, wait) { let timeout; return function executedFunction(...args) { const later = () => { clearTimeout(timeout); func(...args); }; clearTimeout(timeout); timeout = setTimeout(later, wait); }; }
const dashboardRoot = document.getElementById('dashboardRoot');
const panelUpdateIntervals = [];
let globalAlertPanelRef = null;
// --- Theme and Color Management ---
const baseColors = [
{ name: 'amber', hex: '#FFB000', rgb: '255,176,0' }, { name: 'green', hex: '#00FF00', rgb: '0,255,0' },
{ name: 'red', hex: '#FF4444', rgb: '255,68,68' }, { name: 'blue', hex: '#55CCFF', rgb: '85,204,255' },
{ name: 'white', hex: '#FFFFFF', rgb: '255,255,255' }, { name: 'purple', hex: '#9370DB', rgb: '147,112,219' },
{ name: 'orange', hex: '#FFA500', rgb: '255,165,0' }, { name: 'pink', hex: '#FFC0CB', rgb: '255,192,203' },
{ name: 'teal', hex: '#008080', rgb: '0,128,128' }, { name: 'yellow', hex: '#FFFF00', rgb: '255,255,0' },
{ name: 'fuchsia', hex: '#FF00FF', rgb: '255,0,255' }
];
function applyRandomMonochromeTheme() { const selectedBase = baseColors[Math.floor(Math.random() * baseColors.length)]; window.currentThemeName = selectedBase.name; const rootStyle = document.documentElement.style; rootStyle.setProperty('--base-phosphor-color', selectedBase.hex); rootStyle.setProperty('--base-phosphor-color-rgb', selectedBase.rgb); }
// --- Panel Utilities ---
function createPanelShell(type = '', areaName = '') {
const panel = document.createElement('div'); panel.className = 'panel';
if (type) panel.classList.add(type + '-type');
if (areaName) {
panel.style.gridArea = areaName;
console.log('Setting grid-area:', areaName, 'on panel'); // DEBUG
}
const title = document.createElement('div'); title.className = 'panel-title'; panel.appendChild(title);
return { panel, title };
}
// Universal dimension waiter - keeps trying until we get REAL dimensions
function waitForDimensions(element, callback, dimensionType = 'height') {
let attempts = 0;
const maxAttempts = 100;
function check() {
attempts++;
const rect = element.getBoundingClientRect();
const height = rect.height;
const width = rect.width;
// We have real dimensions when both are > 20px (not just initialized)
if (height > 20 && width > 20) {
callback(width, height);
return;
}
// Keep trying
if (attempts < maxAttempts) {
requestAnimationFrame(check);
} else {
// Fallback after 100 attempts (~1.5 seconds)
// Use viewport-based fallback
const fallbackHeight = window.innerHeight * 0.3; // Assume 30% of viewport
const fallbackWidth = window.innerWidth * 0.3;
callback(fallbackWidth, fallbackHeight);
}
}
// Start checking
requestAnimationFrame(check);
}
function displayAlertMessage(glyphCount = 12, duration = 2000) { if (globalAlertPanelRef && globalAlertPanelRef.messageDiv) { const originalContent = Array.from(globalAlertPanelRef.messageDiv.childNodes); generateAlienSVGSequence(glyphCount, globalAlertPanelRef.messageDiv, true); setTimeout(() => { if (globalAlertPanelRef.messageDiv) { globalAlertPanelRef.messageDiv.innerHTML = ''; originalContent.forEach(node => globalAlertPanelRef.messageDiv.appendChild(node)); globalAlertPanelRef.updateAlert(); } }, duration); } }
// --- Canvas Panel Initialization ---
function initCanvasPanel(panel, canvas, drawFunction, initDataFunction) {
canvas.drawFunction = drawFunction;
let hasInitialized = false;
let attemptCount = 0;
const MAX_ATTEMPTS = 50; // ~3 seconds at 60fps
function attemptDraw() {
if (!panel.isConnected) {
if (initDataFunction && typeof canvas.clearAnimation === 'function') {
canvas.clearAnimation();
}
return;
}
const currentRect = canvas.getBoundingClientRect();
if (currentRect.width > 0 && currentRect.height > 0) {
if (!hasInitialized || canvas.width !== currentRect.width || canvas.height !== currentRect.height) {
canvas.width = currentRect.width;
canvas.height = currentRect.height;
if (initDataFunction) {
initDataFunction(canvas.width, canvas.height, canvas);
}
hasInitialized = true;
if (canvas.dataset.hasDrawnOnce) {
delete canvas.dataset.hasDrawnOnce;
}
}
drawFunction(canvas);
canvas.dataset.hasDrawnOnce = true;
attemptCount = 0; // Reset on success
} else {
attemptCount++;
if (attemptCount < MAX_ATTEMPTS) {
requestAnimationFrame(attemptDraw);
} else {
// Fallback: force a small canvas size
console.warn('Canvas failed to get dimensions, using fallback', canvas.className);
canvas.width = 200;
canvas.height = 150;
if (initDataFunction) {
initDataFunction(200, 150, canvas);
}
hasInitialized = true;
drawFunction(canvas);
}
}
}
const resizeHandler = debounce(() => {
hasInitialized = false;
if (initDataFunction && typeof canvas.clearAnimation === 'function') {
canvas.clearAnimation();
}
attemptDraw();
}, 100);
window.addEventListener('resize', resizeHandler);
requestAnimationFrame(attemptDraw);
return () => {
window.removeEventListener('resize', resizeHandler);
if (initDataFunction && typeof canvas.clearAnimation === 'function') {
canvas.clearAnimation();
}
};
}
// --- Panel Creation Functions ---
// Abstract Data Grid Panel (Canvas)
function drawAbstractDataGrid(canvasEl) {
const ctx = canvasEl.getContext('2d');
const w = canvasEl.width, h = canvasEl.height;
if (w <= 0 || h <= 0) return;
ctx.clearRect(0, 0, w, h);
const baseRGB = getComputedStyle(document.documentElement).getPropertyValue('--base-phosphor-color-rgb').trim();
const primaryColor = `rgb(${baseRGB})`;
const glowColor = `rgba(${baseRGB}, 0.5)`;
const alertColorCanvas = `rgba(${baseRGB}, 0.8)`;
ctx.strokeStyle = primaryColor;
ctx.fillStyle = primaryColor;
ctx.shadowColor = glowColor;
ctx.shadowBlur = 3;
const gridSizeX = Math.floor(Math.random() * (w / 30)) + 8;
const gridSizeY = Math.floor(Math.random() * (h / 30)) + 6;
const cellWidth = w / gridSizeX, cellHeight = h / gridSizeY;
ctx.lineWidth = Math.max(0.5, Math.min(w, h) * 0.001);
for (let i = 0; i <= gridSizeX; i++) {
ctx.beginPath(); ctx.moveTo(i * cellWidth, 0); ctx.lineTo(i * cellWidth, h); ctx.stroke();
}
for (let j = 0; j <= gridSizeY; j++) {
ctx.beginPath(); ctx.moveTo(0, j * cellHeight); ctx.lineTo(w, j * cellHeight); ctx.stroke();
}
const numLines = Math.floor(Math.random() * 6) + 4;
ctx.lineWidth = Math.max(1, Math.min(w, h) * 0.002);
for (let i = 0; i < numLines; i++) {
ctx.beginPath(); ctx.moveTo(Math.random() * w, Math.random() * h); ctx.lineTo(Math.random() * w, Math.random() * h);
ctx.strokeStyle = (Math.random() < 0.3 ? alertColorCanvas : primaryColor); ctx.stroke();
}
const numCircles = Math.floor(Math.random() * 5) + 3;
for (let i = 0; i < numCircles; i++) {
ctx.beginPath(); const radius = Math.random() * (Math.min(w, h) * 0.03) + (Math.min(w, h) * 0.005);
ctx.arc(Math.random() * w, Math.random() * h, radius, 0, Math.PI * 2);
if (Math.random() < 0.5) {
ctx.fillStyle = (Math.random() < 0.3 ? `rgba(${baseRGB}, 0.6)` : `rgba(${baseRGB}, 0.3)`); ctx.fill();
} else {
ctx.strokeStyle = primaryColor; ctx.lineWidth = Math.max(0.75, Math.min(w, h) * 0.0015); ctx.stroke();
}
}
const numNodes = Math.floor(Math.random() * 6) + 4;
for (let i = 0; i < numNodes; i++) {
if (Math.floor(Date.now() / (350 + Math.random() * 250)) % 2 === 0) {
ctx.beginPath(); const nodeX = Math.random() * w; const nodeY = Math.random() * h;
const nodeSize = Math.random() * (Math.min(w, h) * 0.005) + (Math.min(w, h) * 0.002);
ctx.arc(nodeX, nodeY, nodeSize, 0, Math.PI * 2);
ctx.fillStyle = (Math.random() < 0.4 ? alertColorCanvas : primaryColor); ctx.fill();
}
}
ctx.shadowColor = 'transparent'; ctx.shadowBlur = 0;
}
function createAbstractDataGridPanel(areaName) {
const { panel } = createPanelShell('abstract-grid-main', areaName);
const canvas = document.createElement('canvas');
canvas.className = 'main-display-canvas';
panel.appendChild(canvas);
function drawAndLoop(canvasEl) {
drawAbstractDataGrid(canvasEl);
}
panel.initContent = () => initCanvasPanel(panel, canvas, drawAndLoop, null);
panelUpdateIntervals.push(setInterval(() => {
if (panel.isConnected && Math.random() < 0.25 && canvas.getBoundingClientRect().width > 0) {
drawAbstractDataGrid(canvas);
}
}, 1800 + Math.random() * 1200));
return panel;
}
// Schematic Panel (Canvas with particle animation)
function createSchematicPanel(areaName) {
const { panel } = createPanelShell('schematic-main', areaName);
const canvas = document.createElement('canvas');
canvas.className = 'main-display-canvas';
panel.appendChild(canvas);
let animationFrameIdSchematic;
let particles = [];
const numParticles = 25;
function initParticles(w, h) {
particles = [];
for (let i = 0; i < numParticles; i++) {
particles.push({ x: Math.random() * w, y: Math.random() * h, vx: (Math.random() - 0.5) * 0.3, vy: (Math.random() - 0.5) * 0.3, size: Math.random() * 1.5 + 0.5, alpha: Math.random() * 0.5 + 0.2, life: Math.random() * 100 + 50 });
}
}
canvas.clearAnimation = () => {
if (animationFrameIdSchematic) {
cancelAnimationFrame(animationFrameIdSchematic);
animationFrameIdSchematic = null;
}
};
function drawSchematic(canvasEl) {
if (!canvasEl.isConnected) { if(animationFrameIdSchematic) cancelAnimationFrame(animationFrameIdSchematic); animationFrameIdSchematic = null; return; }
const ctxEl = canvasEl.getContext('2d');
const w = canvasEl.width, h = canvasEl.height;
if (w <=0 || h <=0) { animationFrameIdSchematic = requestAnimationFrame(() => drawSchematic(canvasEl)); return;}
if(particles.length === 0 && (w > 0 && h > 0) ) initParticles(w,h);
ctxEl.clearRect(0, 0, w, h);
const baseRGB = getComputedStyle(document.documentElement).getPropertyValue('--base-phosphor-color-rgb').trim();
const primaryColor = `rgb(${baseRGB})`;
const glowColorStrong = `rgba(${baseRGB}, 0.5)`;
ctxEl.strokeStyle = primaryColor; ctxEl.shadowColor = glowColorStrong; ctxEl.shadowBlur = 5;
particles.forEach(p => {
ctxEl.beginPath(); ctxEl.arc(p.x, p.y, p.size, 0, Math.PI * 2);
ctxEl.fillStyle = `rgba(${baseRGB}, ${p.alpha})`; ctxEl.fill();
p.x += p.vx; p.y += p.vy; p.life--;
if (p.x < 0 || p.x > w || p.y < 0 || p.y > h || p.life <= 0) {
p.x = Math.random() * w; p.y = Math.random() * h;
p.vx = (Math.random() - 0.5) * 0.3; p.vy = (Math.random() - 0.5) * 0.3;
p.alpha = Math.random() * 0.5 + 0.2; p.life = Math.random() * 100 + 50;
}
});
ctxEl.lineWidth = 0.3;
for (let i = 0; i < particles.length; i++) {
for (let j = i + 1; j < particles.length; j++) {
const dist = Math.hypot(particles[i].x - particles[j].x, particles[i].y - particles[j].y);
if (dist < Math.min(w,h) / 6) {
ctxEl.beginPath(); ctxEl.moveTo(particles[i].x, particles[i].y); ctxEl.lineTo(particles[j].x, particles[j].y);
ctxEl.strokeStyle = `rgba(${baseRGB}, ${Math.min(particles[i].alpha, particles[j].alpha) * 0.3})`; ctxEl.stroke();
}
}
}
ctxEl.lineWidth = Math.max(0.8, Math.min(w,h) * 0.007); ctxEl.strokeStyle = primaryColor;
if (Math.floor(Date.now() / 500) % 2 === 0) { ctxEl.beginPath(); ctxEl.arc(w / 2, h / 2, Math.min(w,h) * 0.03, 0, Math.PI * 2); ctxEl.stroke(); }
ctxEl.shadowColor = 'transparent'; ctxEl.shadowBlur = 0;
animationFrameIdSchematic = requestAnimationFrame(() => drawSchematic(canvasEl));
}
panel.initContent = () => initCanvasPanel(panel, canvas, drawSchematic, initParticles);
return panel;
}
// Status Panel (Text-based with blinking dots)
function createStatusPanel(areaName) {
const { panel, title } = createPanelShell('status', areaName);
const contentArea = document.createElement('div');
contentArea.style.flexGrow = "1";
contentArea.style.overflowY = "auto";
contentArea.style.display = "flex";
contentArea.style.flexDirection = "column";
panel.appendChild(contentArea);
const fillItems = (width, height) => {
if (!panel.isConnected) return;
contentArea.innerHTML = '';
// Calculate items based on ACTUAL height
const estimatedItemHeight = 14;
// Fill to 140% so there's always overflow/scrolling
const numItems = Math.max(10, Math.floor(height * 1.4 / estimatedItemHeight));
for (let i = 0; i < numItems; i++) {
const item = document.createElement('div');
item.className = 'status-item';
const label = document.createElement('span');
const dot = document.createElement('span');
dot.className = 'status-dot';
label.appendChild(dot);
generateAlienSVGSequence(Math.floor(Math.random() * 7) + 10, label, false);
const value = document.createElement('span');
generateAlienSVGSequence(Math.floor(Math.random() * 6) + 8, value, Math.random() < 0.35);
item.appendChild(label);
item.appendChild(value);
contentArea.appendChild(item);
const updateDot = () => {
if (!panel.isConnected) return;
dot.classList.remove('active', 'blinking');
if (Math.random() < 0.75) {
dot.classList.add('active');
if (Math.random() < 0.35) dot.classList.add('blinking');
}
};
updateDot();
panelUpdateIntervals.push(setInterval(updateDot, 3000 + Math.random() * 2000));
}
};
panel.initContent = () => {
waitForDimensions(contentArea, fillItems);
};
return panel;
}
// Data Stream Panel (Scrolling text lines)
function createDataStreamPanel(areaName) {
const { panel } = createPanelShell('datastream', areaName);
const streamDiv = document.createElement('div');
streamDiv.className = 'data-stream';
panel.appendChild(streamDiv);
const maxHistoryLines = 200; // Much more content
let initialFillDone = false;
function attemptFill() {
if (!panel.isConnected) return false;
const panelWidth = streamDiv.clientWidth || 300;
if (!initialFillDone) {
// Fill with lots of lines immediately
for(let i = 0; i < 100; i++) {
streamDiv.appendChild(generateAlienSVGLine(Math.floor(Math.random() * 20) + 25, panelWidth));
}
streamDiv.scrollTop = streamDiv.scrollHeight;
initialFillDone = true;
}
return true;
}
function updateStream() {
if (!panel.isConnected) return;
if (!initialFillDone) { if(!attemptFill()) return; }
const panelWidth = streamDiv.clientWidth || 300;
const numLinesToAdd = Math.floor(Math.random() * 2) + 1;
for (let k = 0; k < numLinesToAdd; k++) {
if (streamDiv.children.length >= maxHistoryLines) streamDiv.removeChild(streamDiv.firstChild);
streamDiv.appendChild(generateAlienSVGLine(Math.floor(Math.random() * 20) + 25, panelWidth));
}
streamDiv.scrollTop = streamDiv.scrollHeight;
}
panel.initContent = attemptFill;
setTimeout(attemptFill, 100);
panelUpdateIntervals.push(setInterval(updateStream, 300 + Math.random() * 150));
return panel;
}
// Comms Log Panel (Similar to Data Stream, slower updates)
function createCommsLogPanel(areaName) {
const { panel } = createPanelShell('commslog', areaName);
const logContent = document.createElement('div');
logContent.className = 'comms-log-content';
panel.appendChild(logContent);
const estimatedLineHeight = 15;
const maxHistoryLines = 150;
let initialFillDone = false;
function attemptFill() {
if (!panel.isConnected) return false;
if (!logContent.clientWidth || !logContent.clientHeight) {
if (panel.clientHeight > 0 && panel.clientWidth > 0) { requestAnimationFrame(attemptFill); }
return false;
}
const panelWidth = logContent.clientWidth;
const visibleLines = Math.floor(logContent.clientHeight / estimatedLineHeight);
const linesToInitiallyFill = 80; // Just fill with lots of lines
if (!initialFillDone) {
for(let i = 0; i < linesToInitiallyFill; i++) {
if (logContent.children.length < maxHistoryLines) {
logContent.appendChild(generateAlienSVGLine(Math.floor(Math.random() * 30) + 25, panelWidth));
}
}
logContent.scrollTop = logContent.scrollHeight; initialFillDone = true;
} return true;
}
function updateLog() {
if (!panel.isConnected) return;
if (!initialFillDone) { if(!attemptFill()) return; }
if (!logContent.clientWidth) return;
const panelWidth = logContent.clientWidth;
logContent.appendChild(generateAlienSVGLine(Math.floor(Math.random() * 30) + 25, panelWidth));
if (logContent.children.length > maxHistoryLines) logContent.removeChild(logContent.firstChild);
logContent.scrollTop = logContent.scrollHeight;
}
panel.initContent = attemptFill;
panelUpdateIntervals.push(setInterval(updateLog, 2000 + Math.random() * 1000));
return panel;
}
// Alert Panel (Blinking alert message)
function createAlertPanel(areaName) { const { panel } = createPanelShell('alert', areaName); panel.classList.add('alert-type'); const messageDiv = document.createElement('div'); messageDiv.className = 'alert-message-content'; panel.appendChild(messageDiv); const updateAlert = () => { if (!panel.isConnected) return; generateAlienSVGSequence(Math.floor(Math.random() * 12) + 12, messageDiv); }; setTimeout(updateAlert,0); const intervalId = setInterval(updateAlert, 2800 + Math.random() * 2200); panelUpdateIntervals.push(intervalId); globalAlertPanelRef = { messageDiv, updateAlert, intervalId }; panel.initContent = updateAlert; return panel; }
// Signal Bars Panel (Animated bar heights)
function createSignalBarsPanel(areaName) {
const { panel } = createPanelShell('signalbars', areaName);
const barsContainer = document.createElement('div');
barsContainer.className = 'signal-bars-container';
panel.appendChild(barsContainer);
const initBars = () => {
if (!panel.isConnected) return;
barsContainer.innerHTML = '';
const effectiveWidth = barsContainer.getBoundingClientRect().width || barsContainer.clientWidth || 200;
const numBars = Math.max(8, Math.floor(effectiveWidth / 6)); // Thin bars, many of them
const bars = [];
for (let i = 0; i < numBars; i++) {
const bar = document.createElement('div');
bar.className = 'signal-bar';
bar.style.width = `${100/numBars - 1}%`;
barsContainer.appendChild(bar);
bars.push(bar);
}
const updateBars = () => {
if (!panel.isConnected) return;
bars.forEach(bar => bar.style.height = (Math.random() * 80 + 20) + '%');
};
updateBars();
panelUpdateIntervals.push(setInterval(updateBars, 650 + Math.random() * 350));
};
let resizeTimeout;
const resizeObserver = new ResizeObserver(() => {
clearTimeout(resizeTimeout);
resizeTimeout = setTimeout(initBars, 100);
});
resizeObserver.observe(barsContainer);
panel.initContent = initBars;
setTimeout(initBars, 150);
return panel;
}
// Target List Panel (Selectable items)
function createTargetListPanel(areaName) {
const { panel, title } = createPanelShell('targetlist', areaName);
const listContent = document.createElement('div');
listContent.className = 'target-list-content';
panel.appendChild(listContent);
const initList = (width, height) => {
if (!panel.isConnected) return;
listContent.innerHTML = '';
const estimatedItemHeight = 14;
const numTargets = Math.max(10, Math.floor(height * 1.4 / estimatedItemHeight));
for (let i = 0; i < numTargets; i++) {
const item = document.createElement('div');
item.className = 'target-item-line';
const idLabel = document.createElement('span');
const dot = document.createElement('span');
dot.className = 'status-dot';
idLabel.appendChild(dot);
generateAlienSVGSequence(Math.floor(Math.random()*5)+6, idLabel);
const coordsValue = document.createElement('span');
generateAlienSVGSequence(Math.floor(Math.random()*8)+10, coordsValue);
item.appendChild(idLabel);
item.appendChild(coordsValue);
listContent.appendChild(item);
dot.classList.remove('active', 'blinking');
if (Math.random() < 0.8) {
dot.classList.add('active');
if (Math.random() < 0.4) dot.classList.add('blinking');
}
item.onclick = () => {
if (!panel.isConnected) return;
document.querySelectorAll('.target-item-line.selected').forEach(el => el.classList.remove('selected'));
item.classList.add('selected');
dot.classList.add('blinking-fast');
setTimeout(() => dot.classList.remove('blinking-fast'), 1000);
displayAlertMessage(Math.floor(Math.random()*3)+5);
};
}
};
panel.initContent = () => {
waitForDimensions(listContent, initList);
};
panelUpdateIntervals.push(setInterval(() => {
if (listContent.children.length > 0) {
// Just regenerate occasionally
const height = listContent.getBoundingClientRect().height;
if (height > 20) initList(0, height);
}
}, 5000 + Math.random() * 2000));
return panel;
}
// Diagnostics Panel (With progress bars)
function createDiagnosticsPanel(areaName) {
const { panel, title } = createPanelShell('diagnostics', areaName);
const diagContent = document.createElement('div');
diagContent.className = 'diag-list-content';
panel.appendChild(diagContent);
const initDiag = (width, height) => {
if (!panel.isConnected) return;
diagContent.innerHTML = '';
const estimatedItemHeight = 20; // item + progress bar
const numSystems = Math.max(8, Math.floor(height * 1.4 / estimatedItemHeight));
const systemElements = [];
for (let i = 0; i < numSystems; i++) {
const item = document.createElement('div');
item.className = 'diag-item';
const label = document.createElement('span');
generateAlienSVGSequence(Math.floor(Math.random()*7)+8, label);
const statusValue = document.createElement('span');
const progressBarContainer = document.createElement('div');
progressBarContainer.className = 'progress-bar-container';
const progressBarFill = document.createElement('div');
progressBarFill.className = 'progress-bar-fill';
progressBarContainer.appendChild(progressBarFill);
item.appendChild(label);
item.appendChild(statusValue);
diagContent.appendChild(item);
diagContent.appendChild(progressBarContainer);
systemElements.push({ item, label, statusValue, progressBarFill });
label.onclick = () => {
if (!panel.isConnected) return;
progressBarFill.style.width = '0%';
setTimeout(() => {
generateAlienSVGSequence(Math.floor(Math.random()*5)+5, statusValue, true);
progressBarFill.style.width = (Math.random() * 85 + 15) + '%';
}, 100);
setTimeout(() => statusValue.classList.remove('blinking'), 1000);
displayAlertMessage(Math.floor(Math.random()*2)+3);
};
}
const updateDiagnostics = () => {
if (!panel.isConnected) return;
systemElements.forEach(sys => {
if (!sys.statusValue.classList.contains('blinking')) {
generateAlienSVGSequence(Math.floor(Math.random()*5)+5, sys.statusValue, Math.random() < 0.15);
}
if (parseFloat(sys.progressBarFill.style.width) === 0) {} else {
sys.progressBarFill.style.width = (Math.random() * 85 + 15) + '%';
}
});
};
setTimeout(updateDiagnostics,0);
panelUpdateIntervals.push(setInterval(updateDiagnostics, 3500 + Math.random() * 1000));
};
panel.initContent = () => {
waitForDimensions(diagContent, initDiag);
};
return panel;
}
// Waveform Panel (Animated line graph on canvas)
function createWaveformPanel(areaName) {
const { panel } = createPanelShell('waveform', areaName);
const canvas = document.createElement('canvas');
canvas.className = 'waveform-canvas';
panel.appendChild(canvas);
let animationFrameIdWave;
const waveData = new Array(100).fill(0);
canvas.clearAnimation = () => { if (animationFrameIdWave) cancelAnimationFrame(animationFrameIdWave); animationFrameIdWave = null; };
function drawWave(canvasEl) {
if (!canvasEl.isConnected) { if(animationFrameIdWave) cancelAnimationFrame(animationFrameIdWave); animationFrameIdWave = null; return; }
const ctx = canvasEl.getContext('2d');
const w = canvasEl.width, h = canvasEl.height;
if(w <= 0 || h <= 0) {animationFrameIdWave = requestAnimationFrame(() => drawWave(canvasEl)); return;}
ctx.clearRect(0, 0, w, h);
const baseRGB = getComputedStyle(document.documentElement).getPropertyValue('--base-phosphor-color-rgb').trim();
const primaryColor = `rgb(${baseRGB})`;
const glowColor = `rgba(${baseRGB}, 0.4)`;
ctx.strokeStyle = primaryColor;
ctx.lineWidth = Math.max(1, Math.min(w,h) * 0.01);
ctx.shadowColor = glowColor; ctx.shadowBlur = 3;
const newDataPoint = (Math.random() - 0.5) * (h * 0.8) + (h / 2);
waveData.push(newDataPoint);
if (waveData.length > w / 2) waveData.shift();
ctx.beginPath(); ctx.moveTo(0, waveData[0] || h/2);
for (let i = 0; i < waveData.length; i++) {
ctx.lineTo(i * (w / (waveData.length -1 || 1) ), waveData[i]);
}
ctx.stroke();
ctx.shadowColor = 'transparent';
animationFrameIdWave = requestAnimationFrame(() => drawWave(canvasEl));
}
panel.initContent = () => initCanvasPanel(panel, canvas, drawWave, null);
return panel;
}
// Numeric Readout Panel (Lines of numeric-like glyphs)
function createNumericReadoutPanel(areaName) {
const { panel, title } = createPanelShell('numeric-readout', areaName);
panel.classList.add('numeric-readout-panel');
const initReadout = (width, height) => {