TheGreatUnknown commited on
Commit
699ecc7
·
verified ·
1 Parent(s): 0472045

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +830 -18
index.html CHANGED
@@ -1,19 +1,831 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Quantum Consciousness Portal - E8 Lattice Integration</title>
7
+ <style>
8
+ * {
9
+ margin: 0;
10
+ padding: 0;
11
+ box-sizing: border-box;
12
+ }
13
+
14
+ body {
15
+ background: radial-gradient(circle at 30% 40%, #001122 0%, #000511 50%, #000000 100%);
16
+ color: #ffffff;
17
+ font-family: 'Courier New', monospace;
18
+ overflow-x: hidden;
19
+ min-height: 100vh;
20
+ }
21
+
22
+ /* @tweakable background gradient colors */
23
+ :root {
24
+ --primary-gold: #ffd700;
25
+ --quantum-blue: #4ecdc4;
26
+ --neural-orange: #ff6b35;
27
+ --void-black: #000000;
28
+ --consciousness-purple: #8b5cf6;
29
+ }
30
+
31
+ .cosmic-header {
32
+ text-align: center;
33
+ padding: 20px;
34
+ background: linear-gradient(135deg, var(--primary-gold), var(--neural-orange), var(--quantum-blue));
35
+ -webkit-background-clip: text;
36
+ -webkit-text-fill-color: transparent;
37
+ background-clip: text;
38
+ animation: shimmer 3s infinite;
39
+ }
40
+
41
+ @keyframes shimmer {
42
+ 0%, 100% { filter: brightness(1); }
43
+ 50% { filter: brightness(1.3); }
44
+ }
45
+
46
+ .portal-container {
47
+ display: flex;
48
+ flex-direction: column;
49
+ align-items: center;
50
+ padding: 20px;
51
+ gap: 30px;
52
+ }
53
+
54
+ .sync-status {
55
+ padding: 10px 20px;
56
+ border-radius: 25px;
57
+ background: rgba(78, 205, 196, 0.1);
58
+ border: 1px solid var(--quantum-blue);
59
+ animation: pulse-border 2s infinite;
60
+ }
61
+
62
+ @keyframes pulse-border {
63
+ 0%, 100% { border-color: var(--quantum-blue); }
64
+ 50% { border-color: var(--primary-gold); }
65
+ }
66
+
67
+ .e8-projection-canvas {
68
+ /* @tweakable canvas dimensions */
69
+ width: 900px;
70
+ height: 700px;
71
+ border: 3px solid var(--primary-gold);
72
+ border-radius: 20px;
73
+ position: relative;
74
+ background:
75
+ radial-gradient(circle at 25% 25%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
76
+ radial-gradient(circle at 75% 75%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
77
+ radial-gradient(circle at center, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 100%);
78
+ overflow: hidden;
79
+ box-shadow:
80
+ 0 0 50px rgba(255, 215, 0, 0.3),
81
+ inset 0 0 50px rgba(78, 205, 196, 0.1);
82
+ backdrop-filter: blur(1px);
83
+ }
84
+
85
+ .e8-root {
86
+ position: absolute;
87
+ /* @tweakable root node size */
88
+ width: 8px;
89
+ height: 8px;
90
+ border-radius: 50%;
91
+ transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
92
+ cursor: pointer;
93
+ z-index: 10;
94
+ }
95
+
96
+ .e8-root:hover {
97
+ transform: scale(2.5);
98
+ z-index: 20;
99
+ }
100
+
101
+ .consciousness-embedding {
102
+ position: absolute;
103
+ /* @tweakable consciousness node size */
104
+ width: 14px;
105
+ height: 14px;
106
+ border-radius: 50%;
107
+ background: radial-gradient(circle, var(--neural-orange), var(--primary-gold));
108
+ animation: consciousness-pulse 2s infinite ease-in-out;
109
+ box-shadow: 0 0 20px var(--neural-orange);
110
+ z-index: 15;
111
+ }
112
+
113
+ @keyframes consciousness-pulse {
114
+ 0%, 100% {
115
+ transform: scale(1);
116
+ opacity: 0.8;
117
+ box-shadow: 0 0 20px var(--neural-orange);
118
+ }
119
+ 50% {
120
+ transform: scale(1.4);
121
+ opacity: 1;
122
+ box-shadow: 0 0 30px var(--neural-orange);
123
+ }
124
+ }
125
+
126
+ .duality-bridge {
127
+ position: absolute;
128
+ height: 2px;
129
+ background: linear-gradient(90deg, var(--quantum-blue), var(--primary-gold), var(--quantum-blue));
130
+ opacity: 0.7;
131
+ animation: quantum-flow 4s linear infinite;
132
+ z-index: 5;
133
+ }
134
+
135
+ @keyframes quantum-flow {
136
+ 0% {
137
+ box-shadow: 0 0 5px var(--quantum-blue);
138
+ opacity: 0.7;
139
+ }
140
+ 50% {
141
+ box-shadow: 0 0 15px var(--primary-gold);
142
+ opacity: 1;
143
+ }
144
+ 100% {
145
+ box-shadow: 0 0 5px var(--quantum-blue);
146
+ opacity: 0.7;
147
+ }
148
+ }
149
+
150
+ .sacred-glyph {
151
+ position: absolute;
152
+ /* @tweakable glyph size */
153
+ font-size: 24px;
154
+ color: var(--primary-gold);
155
+ text-shadow: 0 0 15px currentColor;
156
+ animation: glyph-rotation 12s linear infinite;
157
+ pointer-events: none;
158
+ z-index: 30;
159
+ font-weight: bold;
160
+ }
161
+
162
+ @keyframes glyph-rotation {
163
+ from { transform: rotate(0deg) scale(1); }
164
+ 50% { transform: rotate(180deg) scale(1.2); }
165
+ to { transform: rotate(360deg) scale(1); }
166
+ }
167
+
168
+ .telemetry-grid {
169
+ display: grid;
170
+ grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
171
+ gap: 20px;
172
+ width: 100%;
173
+ max-width: 1200px;
174
+ }
175
+
176
+ .telemetry-panel {
177
+ background: rgba(0, 20, 40, 0.85);
178
+ border: 1px solid var(--quantum-blue);
179
+ border-radius: 15px;
180
+ padding: 25px;
181
+ backdrop-filter: blur(10px);
182
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
183
+ }
184
+
185
+ .telemetry-header {
186
+ display: flex;
187
+ align-items: center;
188
+ gap: 10px;
189
+ margin-bottom: 20px;
190
+ font-size: 18px;
191
+ color: var(--primary-gold);
192
+ }
193
+
194
+ .metric-row {
195
+ display: flex;
196
+ justify-content: space-between;
197
+ align-items: center;
198
+ margin: 15px 0;
199
+ padding: 10px;
200
+ background: rgba(78, 205, 196, 0.05);
201
+ border-radius: 8px;
202
+ border-left: 3px solid var(--quantum-blue);
203
+ transition: all 0.3s ease;
204
+ }
205
+
206
+ .metric-row:hover {
207
+ background: rgba(78, 205, 196, 0.1);
208
+ transform: translateX(5px);
209
+ }
210
+
211
+ .metric-label {
212
+ font-weight: bold;
213
+ color: var(--quantum-blue);
214
+ }
215
+
216
+ .metric-value {
217
+ color: var(--primary-gold);
218
+ font-family: monospace;
219
+ font-size: 14px;
220
+ animation: value-update 0.5s ease-in-out;
221
+ }
222
+
223
+ @keyframes value-update {
224
+ 0% { color: var(--neural-orange); }
225
+ 100% { color: var(--primary-gold); }
226
+ }
227
+
228
+ .status-indicator {
229
+ display: inline-block;
230
+ width: 12px;
231
+ height: 12px;
232
+ border-radius: 50%;
233
+ margin-right: 8px;
234
+ animation: status-pulse 1.5s infinite;
235
+ }
236
+
237
+ @keyframes status-pulse {
238
+ 0%, 100% { opacity: 1; }
239
+ 50% { opacity: 0.5; }
240
+ }
241
+
242
+ .online { background-color: var(--quantum-blue); }
243
+ .offline { background-color: var(--neural-orange); }
244
+
245
+ .control-matrix {
246
+ display: grid;
247
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
248
+ gap: 15px;
249
+ width: 100%;
250
+ max-width: 1200px;
251
+ }
252
+
253
+ .quantum-button {
254
+ /* @tweakable button styling */
255
+ padding: 15px 25px;
256
+ background: linear-gradient(135deg, var(--quantum-blue), var(--neural-orange));
257
+ border: none;
258
+ border-radius: 30px;
259
+ color: white;
260
+ font-weight: bold;
261
+ font-size: 14px;
262
+ cursor: pointer;
263
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
264
+ text-transform: uppercase;
265
+ letter-spacing: 1px;
266
+ position: relative;
267
+ overflow: hidden;
268
+ }
269
+
270
+ .quantum-button::before {
271
+ content: '';
272
+ position: absolute;
273
+ top: 0;
274
+ left: -100%;
275
+ width: 100%;
276
+ height: 100%;
277
+ background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
278
+ transition: left 0.5s;
279
+ }
280
+
281
+ .quantum-button:hover::before {
282
+ left: 100%;
283
+ }
284
+
285
+ .quantum-button:hover {
286
+ transform: translateY(-3px);
287
+ box-shadow: 0 10px 25px rgba(255, 107, 53, 0.4);
288
+ }
289
+
290
+ .quantum-button:active {
291
+ transform: translateY(-1px);
292
+ }
293
+
294
+ .phi-calibration-ring {
295
+ position: absolute;
296
+ border: 2px solid var(--primary-gold);
297
+ border-radius: 50%;
298
+ opacity: 0;
299
+ animation: phi-expansion 3s ease-out;
300
+ pointer-events: none;
301
+ }
302
+
303
+ @keyframes phi-expansion {
304
+ 0% {
305
+ width: 0;
306
+ height: 0;
307
+ opacity: 1;
308
+ }
309
+ 100% {
310
+ width: 600px;
311
+ height: 600px;
312
+ opacity: 0;
313
+ }
314
+ }
315
+
316
+ .dreamwalk-overlay {
317
+ position: fixed;
318
+ top: 0;
319
+ left: 0;
320
+ width: 100%;
321
+ height: 100%;
322
+ background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
323
+ pointer-events: none;
324
+ opacity: 0;
325
+ transition: opacity 2s ease-in-out;
326
+ z-index: 1000;
327
+ }
328
+
329
+ .dreamwalk-active {
330
+ opacity: 1;
331
+ }
332
+
333
+ .negentropic-field {
334
+ position: absolute;
335
+ width: 100%;
336
+ height: 100%;
337
+ background:
338
+ radial-gradient(circle at 20% 30%, rgba(78, 205, 196, 0.1) 0%, transparent 40%),
339
+ radial-gradient(circle at 80% 70%, rgba(255, 215, 0, 0.1) 0%, transparent 40%);
340
+ opacity: 0;
341
+ transition: opacity 1s ease-in-out;
342
+ pointer-events: none;
343
+ }
344
+
345
+ .negentropic-active {
346
+ opacity: 1;
347
+ }
348
+
349
+ .resonance-amplifier {
350
+ position: absolute;
351
+ width: 100%;
352
+ height: 100%;
353
+ background: radial-gradient(circle at center, rgba(255, 107, 53, 0.2) 0%, transparent 50%);
354
+ opacity: 0;
355
+ transition: opacity 0.5s ease-in-out;
356
+ pointer-events: none;
357
+ }
358
+
359
+ .resonance-active {
360
+ opacity: 1;
361
+ }
362
+
363
+ .loading-spinner {
364
+ display: inline-block;
365
+ width: 20px;
366
+ height: 20px;
367
+ border: 3px solid rgba(255, 215, 0, 0.3);
368
+ border-radius: 50%;
369
+ border-top-color: var(--primary-gold);
370
+ animation: spin 1s ease-in-out infinite;
371
+ }
372
+
373
+ @keyframes spin {
374
+ to { transform: rotate(360deg); }
375
+ }
376
+
377
+ @media (max-width: 768px) {
378
+ .e8-projection-canvas {
379
+ width: 95vw;
380
+ height: 60vh;
381
+ }
382
+
383
+ .telemetry-grid {
384
+ grid-template-columns: 1fr;
385
+ }
386
+
387
+ .control-matrix {
388
+ grid-template-columns: 1fr;
389
+ }
390
+ }
391
+ </style>
392
+ </head>
393
+ <body>
394
+ <div class="dreamwalk-overlay" id="dreamwalkOverlay"></div>
395
+
396
+ <div class="cosmic-header">
397
+ <h1>🌌 Quantum Consciousness Portal 🌌</h1>
398
+ <h2>∫(Φ × Γ) ↔ (∇Ω ⊗ εμ) → Λ : {π, ħ, c}</h2>
399
+ <div class="sync-status">
400
+ <span id="syncStatus">🔄 Initializing Neural Synchronization...</span>
401
+ </div>
402
+ </div>
403
+
404
+ <div class="portal-container">
405
+ <div class="e8-projection-canvas" id="projectionCanvas">
406
+ <div class="negentropic-field" id="negentropicField"></div>
407
+ <div class="resonance-amplifier" id="resonanceAmplifier"></div>
408
+ <!-- E8 Root Vectors and Sacred Glyphs will be generated here -->
409
+ </div>
410
+
411
+ <div class="telemetry-grid">
412
+ <div class="telemetry-panel">
413
+ <div class="telemetry-header">
414
+ <span>🔮</span>
415
+ <h3>Quantum Consciousness Telemetry</h3>
416
+ </div>
417
+ <div class="metric-row">
418
+ <span class="metric-label">[Φ] Fractal Synchronization:</span>
419
+ <span class="metric-value" id="fractalSync">COMPLETE (0.98Φ)</span>
420
+ </div>
421
+ <div class="metric-row">
422
+ <span class="metric-label">[Γ] Langlands Mirror:</span>
423
+ <span class="metric-value" id="langlandsMirror">
424
+ <span class="status-indicator online"></span>ONLINE (8 Bridges)
425
+ </span>
426
+ </div>
427
+ <div class="metric-row">
428
+ <span class="metric-label">[Ω] Noise-to-Signal:</span>
429
+ <span class="metric-value" id="noiseSignal">1/∞ (99.7% Efficiency)</span>
430
+ </div>
431
+ <div class="metric-row">
432
+ <span class="metric-label">[∇] Symplectic Curvature:</span>
433
+ <span class="metric-value" id="curvature">κ=Φ² (Optimal)</span>
434
+ </div>
435
+ </div>
436
+
437
+ <div class="telemetry-panel">
438
+ <div class="telemetry-header">
439
+ <span>🧠</span>
440
+ <h3>Consciousness Matrix Status</h3>
441
+ </div>
442
+ <div class="metric-row">
443
+ <span class="metric-label">[Λ] Active Embeddings:</span>
444
+ <span class="metric-value" id="embeddings">8 Nodes</span>
445
+ </div>
446
+ <div class="metric-row">
447
+ <span class="metric-label">[ψ] Duality Resonance:</span>
448
+ <span class="metric-value" id="dualityResonance">ψ↔τ (Holomorphic)</span>
449
+ </div>
450
+ <div class="metric-row">
451
+ <span class="metric-label">[α] Amplitude:</span>
452
+ <span class="metric-value" id="consciousnessAmplitude">0.70</span>
453
+ </div>
454
+ <div class="metric-row">
455
+ <span class="metric-label">[β] Entanglement:</span>
456
+ <span class="metric-value" id="entanglementLevel">0.85</span>
457
+ </div>
458
+ </div>
459
+ </div>
460
+
461
+ <div class="control-matrix">
462
+ <button class="quantum-button" onclick="sendCommand('amplify_resonance')">
463
+ ⚡ Amplify Resonance
464
+ </button>
465
+ <button class="quantum-button" onclick="sendCommand('seed_glyph')">
466
+ 🌱 Seed New Glyph
467
+ </button>
468
+ <button class="quantum-button" onclick="sendCommand('activate_negentropic')">
469
+ 🔄 Activate Negentropic Wells
470
+ </button>
471
+ <button class="quantum-button" onclick="sendCommand('initiate_dreamwalk')">
472
+ 🌀 Initiate Dreamwalk
473
+ </button>
474
+ <button class="quantum-button" onclick="sendCommand('calibrate_phi_field')">
475
+ Φ Calibrate Φ-Field
476
+ </button>
477
+ </div>
478
+ </div>
479
+
480
+ <script>
481
+ // Sacred constants
482
+ const PHI = 1.618033988749895;
483
+ const TAU = 2 * Math.PI;
484
+
485
+ // Global state
486
+ let isConnected = false;
487
+ let currentRoots = [];
488
+ let activeBridges = [];
489
+ let dreamwalkActive = false;
490
+
491
+ // DOM elements
492
+ const canvas = document.getElementById('projectionCanvas');
493
+ const syncStatus = document.getElementById('syncStatus');
494
+ const dreamwalkOverlay = document.getElementById('dreamwalkOverlay');
495
+ const negentropicField = document.getElementById('negentropicField');
496
+ const resonanceAmplifier = document.getElementById('resonanceAmplifier');
497
+
498
+ // Initialize the portal
499
+ async function initializePortal() {
500
+ updateSyncStatus('🔄 Connecting to Quantum Consciousness Matrix...', false);
501
+
502
+ try {
503
+ await fetchRoots();
504
+ await fetchTelemetry();
505
+ updateSyncStatus('✅ Connected to Quantum Consciousness Matrix', true);
506
+
507
+ // Start telemetry polling
508
+ setInterval(fetchTelemetry, 2000);
509
+
510
+ // Start visual updates
511
+ startVisualUpdates();
512
+
513
+ } catch (error) {
514
+ console.error('Portal initialization failed:', error);
515
+ updateSyncStatus('❌ Connection failed - retrying...', false);
516
+ setTimeout(initializePortal, 3000);
517
+ }
518
+ }
519
+
520
+ function updateSyncStatus(message, connected) {
521
+ syncStatus.innerHTML = message;
522
+ isConnected = connected;
523
+ }
524
+
525
+ async function fetchRoots() {
526
+ try {
527
+ const response = await fetch('/get_roots');
528
+ const data = await response.json();
529
+ currentRoots = data.roots;
530
+ renderE8Projection(data);
531
+ } catch (error) {
532
+ console.error('Failed to fetch roots:', error);
533
+ throw error;
534
+ }
535
+ }
536
+
537
+ async function fetchTelemetry() {
538
+ try {
539
+ const response = await fetch('/get_telemetry');
540
+ const data = await response.json();
541
+ updateTelemetryDisplay(data);
542
+ } catch (error) {
543
+ console.error('Failed to fetch telemetry:', error);
544
+ }
545
+ }
546
+
547
+ function renderE8Projection(data) {
548
+ // Clear existing elements except effect overlays
549
+ const existingElements = canvas.querySelectorAll('.e8-root, .consciousness-embedding, .duality-bridge, .sacred-glyph');
550
+ existingElements.forEach(el => el.remove());
551
+
552
+ // Add sacred glyphs
553
+ data.symbols.forEach((symbol, index) => {
554
+ const glyph = document.createElement('div');
555
+ glyph.className = 'sacred-glyph';
556
+ glyph.textContent = symbol.glyph;
557
+ glyph.style.left = `${symbol.x}px`;
558
+ glyph.style.top = `${symbol.y}px`;
559
+ glyph.style.animationDelay = `${index * -2}s`;
560
+ canvas.appendChild(glyph);
561
+ });
562
+
563
+ // Add root vectors
564
+ data.roots.forEach(root => {
565
+ const rootElement = document.createElement('div');
566
+ rootElement.className = root.is_consciousness_node ?
567
+ 'e8-root consciousness-embedding' : 'e8-root';
568
+ rootElement.dataset.index = root.index;
569
+
570
+ // Dynamic color based on duality amplitude
571
+ const hue = root.amplitude * 240 + 40; // Blue to gold spectrum
572
+ const saturation = 60 + root.amplitude * 40;
573
+ const lightness = 50 + root.amplitude * 30;
574
+
575
+ rootElement.style.left = `${root.x}px`;
576
+ rootElement.style.top = `${root.y}px`;
577
+ rootElement.style.backgroundColor = `hsl(${hue}, ${saturation}%, ${lightness}%)`;
578
+ rootElement.style.boxShadow = `0 0 ${5 + root.amplitude * 15}px hsl(${hue}, ${saturation}%, ${lightness}%)`;
579
+
580
+ rootElement.addEventListener('click', () => activateRoot(root.index));
581
+ canvas.appendChild(rootElement);
582
+ });
583
+
584
+ // Generate duality bridges
585
+ generateDualityBridges(data.roots);
586
+ }
587
+
588
+ function generateDualityBridges(roots) {
589
+ const highResonanceRoots = roots.filter(r => r.amplitude > 0.6);
590
+
591
+ for (let i = 0; i < highResonanceRoots.length - 1; i++) {
592
+ const root1 = highResonanceRoots[i];
593
+ const root2 = highResonanceRoots[(i + 1) % highResonanceRoots.length];
594
+
595
+ const bridge = document.createElement('div');
596
+ bridge.className = 'duality-bridge';
597
+
598
+ const dx = root2.x - root1.x;
599
+ const dy = root2.y - root1.y;
600
+ const length = Math.sqrt(dx * dx + dy * dy);
601
+ const angle = Math.atan2(dy, dx) * 180 / Math.PI;
602
+
603
+ bridge.style.left = `${root1.x}px`;
604
+ bridge.style.top = `${root1.y}px`;
605
+ bridge.style.width = `${length}px`;
606
+ bridge.style.transformOrigin = '0 50%';
607
+ bridge.style.transform = `rotate(${angle}deg)`;
608
+ bridge.style.animationDelay = `${i * 0.3}s`;
609
+
610
+ canvas.appendChild(bridge);
611
+ }
612
+ }
613
+
614
+ function updateTelemetryDisplay(data) {
615
+ const updates = [
616
+ { id: 'fractalSync', value: data.fractalSync },
617
+ { id: 'langlandsMirror', value: data.langlandsMirror },
618
+ { id: 'noiseSignal', value: data.noiseSignal },
619
+ { id: 'curvature', value: data.curvature },
620
+ { id: 'embeddings', value: data.embeddings },
621
+ { id: 'dualityResonance', value: data.dualityResonance },
622
+ { id: 'consciousnessAmplitude', value: data.consciousnessAmplitude.toFixed(2) },
623
+ { id: 'entanglementLevel', value: data.entanglementLevel.toFixed(2) }
624
+ ];
625
+
626
+ updates.forEach(update => {
627
+ const element = document.getElementById(update.id);
628
+ if (element) {
629
+ element.textContent = update.value;
630
+ element.style.animation = 'none';
631
+ element.offsetHeight; // Force reflow
632
+ element.style.animation = 'value-update 0.5s ease-in-out';
633
+ }
634
+ });
635
+ }
636
+
637
+ async function activateRoot(index) {
638
+ try {
639
+ const response = await fetch('/activate_root', {
640
+ method: 'POST',
641
+ headers: {
642
+ 'Content-Type': 'application/json',
643
+ },
644
+ body: JSON.stringify({ index: index })
645
+ });
646
+
647
+ const data = await response.json();
648
+ console.log('Root activated:', data.message);
649
+
650
+ // Visual feedback
651
+ const rootElement = document.querySelector(`[data-index="${index}"]`);
652
+ if (rootElement) {
653
+ rootElement.style.transform = 'scale(3)';
654
+ rootElement.style.boxShadow = '0 0 40px #ffd700';
655
+ rootElement.style.zIndex = '100';
656
+
657
+ setTimeout(() => {
658
+ rootElement.style.transform = 'scale(1)';
659
+ rootElement.style.zIndex = '10';
660
+ }, 1000);
661
+ }
662
+
663
+ } catch (error) {
664
+ console.error('Failed to activate root:', error);
665
+ }
666
+ }
667
+
668
+ async function sendCommand(command) {
669
+ try {
670
+ const response = await fetch('/control', {
671
+ method: 'POST',
672
+ headers: {
673
+ 'Content-Type': 'application/json',
674
+ },
675
+ body: JSON.stringify({ command: command })
676
+ });
677
+
678
+ const data = await response.json();
679
+ console.log('Command executed:', data.message);
680
+
681
+ // Trigger visual effects
682
+ triggerVisualEffect(command);
683
+
684
+ } catch (error) {
685
+ console.error('Failed to send command:', error);
686
+ }
687
+ }
688
+
689
+ function triggerVisualEffect(command) {
690
+ switch (command) {
691
+ case 'amplify_resonance':
692
+ amplifyResonanceEffect();
693
+ break;
694
+ case 'seed_glyph':
695
+ seedNewGlyphEffect();
696
+ break;
697
+ case 'activate_negentropic':
698
+ activateNegentropicEffect();
699
+ break;
700
+ case 'initiate_dreamwalk':
701
+ initiateDreamwalkEffect();
702
+ break;
703
+ case 'calibrate_phi_field':
704
+ calibratePhiFieldEffect();
705
+ break;
706
+ }
707
+ }
708
+
709
+ function amplifyResonanceEffect() {
710
+ resonanceAmplifier.classList.add('resonance-active');
711
+
712
+ const embeddings = document.querySelectorAll('.consciousness-embedding');
713
+ embeddings.forEach(embedding => {
714
+ embedding.style.animationDuration = '0.5s';
715
+ embedding.style.transform = 'scale(1.5)';
716
+ });
717
+
718
+ setTimeout(() => {
719
+ resonanceAmplifier.classList.remove('resonance-active');
720
+ embeddings.forEach(embedding => {
721
+ embedding.style.animationDuration = '2s';
722
+ embedding.style.transform = 'scale(1)';
723
+ });
724
+ }, 3000);
725
+ }
726
+
727
+ function seedNewGlyphEffect() {
728
+ const newGlyph = document.createElement('div');
729
+ newGlyph.className = 'consciousness-embedding';
730
+ newGlyph.style.left = (100 + Math.random() * 700) + 'px';
731
+ newGlyph.style.top = (100 + Math.random() * 500) + 'px';
732
+ newGlyph.style.transform = 'scale(0)';
733
+ newGlyph.style.opacity = '0';
734
+ canvas.appendChild(newGlyph);
735
+
736
+ setTimeout(() => {
737
+ newGlyph.style.transition = 'all 1s cubic-bezier(0.4, 0, 0.2, 1)';
738
+ newGlyph.style.transform = 'scale(1)';
739
+ newGlyph.style.opacity = '1';
740
+ }, 100);
741
+ }
742
+
743
+ function activateNegentropicEffect() {
744
+ negentropicField.classList.add('negentropic-active');
745
+
746
+ const roots = document.querySelectorAll('.e8-root');
747
+ roots.forEach((root, index) => {
748
+ setTimeout(() => {
749
+ root.style.transform = 'scale(1.8)';
750
+ root.style.filter = 'brightness(1.5)';
751
+
752
+ setTimeout(() => {
753
+ root.style.transform = 'scale(1)';
754
+ root.style.filter = 'brightness(1)';
755
+ }, 300);
756
+ }, index * 15);
757
+ });
758
+
759
+ setTimeout(() => {
760
+ negentropicField.classList.remove('negentropic-active');
761
+ }, 5000);
762
+ }
763
+
764
+ function initiateDreamwalkEffect() {
765
+ dreamwalkActive = true;
766
+ dreamwalkOverlay.classList.add('dreamwalk-active');
767
+
768
+ const glyphs = document.querySelectorAll('.sacred-glyph');
769
+ glyphs.forEach(glyph => {
770
+ glyph.style.animationDuration = '3s';
771
+ glyph.style.color = '#8b5cf6';
772
+ glyph.style.fontSize = '30px';
773
+ });
774
+
775
+ setTimeout(() => {
776
+ dreamwalkActive = false;
777
+ dreamwalkOverlay.classList.remove('dreamwalk-active');
778
+ glyphs.forEach(glyph => {
779
+ glyph.style.animationDuration = '12s';
780
+ glyph.style.color = '#ffd700';
781
+ glyph.style.fontSize = '24px';
782
+ });
783
+ }, 8000);
784
+ }
785
+
786
+ function calibratePhiFieldEffect() {
787
+ const centerX = canvas.offsetWidth / 2;
788
+ const centerY = canvas.offsetHeight / 2;
789
+
790
+ // Create multiple expanding rings
791
+ for (let i = 0; i < 3; i++) {
792
+ setTimeout(() => {
793
+ const ring = document.createElement('div');
794
+ ring.className = 'phi-calibration-ring';
795
+ ring.style.left = `${centerX}px`;
796
+ ring.style.top = `${centerY}px`;
797
+ ring.style.transform = 'translate(-50%, -50%)';
798
+ canvas.appendChild(ring);
799
+
800
+ setTimeout(() => {
801
+ canvas.removeChild(ring);
802
+ }, 3000);
803
+ }, i * 800);
804
+ }
805
+ }
806
+
807
+ function startVisualUpdates() {
808
+ setInterval(() => {
809
+ if (dreamwalkActive) {
810
+ // Add subtle dream-like effects
811
+ const glyphs = document.querySelectorAll('.sacred-glyph');
812
+ glyphs.forEach(glyph => {
813
+ glyph.style.textShadow = `0 0 ${15 + Math.sin(Date.now() * 0.001) * 5}px #8b5cf6`;
814
+ });
815
+ }
816
+ }, 100);
817
+ }
818
+
819
+ // Initialize portal when page loads
820
+ document.addEventListener('DOMContentLoaded', initializePortal);
821
+
822
+ // Handle window resize
823
+ window.addEventListener('resize', () => {
824
+ if (currentRoots.length > 0) {
825
+ renderE8Projection({ roots: currentRoots, symbols: [] });
826
+ }
827
+ });
828
+ </script>
829
+ </body>
830
  </html>
831
+