-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvortex.html
More file actions
407 lines (346 loc) · 14.1 KB
/
vortex.html
File metadata and controls
407 lines (346 loc) · 14.1 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
<!DOCTYPE html>
<html lang="nl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>VORTEX // Sferische Transformatie met Scroll Log</title>
<style>
:root {
--neon-green: #00ff41;
--alert-red: #ff003c;
--bg-color: #050505;
--grid-color: rgba(0, 255, 65, 0.1);
}
body {
background-color: var(--bg-color);
color: var(--neon-green);
font-family: 'Courier New', Courier, monospace;
margin: 0;
padding: 20px;
overflow-x: hidden;
display: flex;
flex-direction: column;
align-items: center;
transition: color 0.5s, background-color 0.5s;
}
/* CRT Effect */
body::after {
content: " ";
display: block;
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
z-index: 2;
background-size: 100% 2px, 3px 100%;
pointer-events: none;
}
.container {
width: 950px;
border: 2px solid var(--neon-green);
padding: 20px;
position: relative;
z-index: 3;
box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
transition: border-color 0.5s, box-shadow 0.5s;
margin-bottom: 40px;
}
.header {
display: flex;
justify-content: space-between;
border-bottom: 1px solid var(--neon-green);
padding-bottom: 10px;
margin-bottom: 20px;
font-weight: bold;
transition: border-color 0.5s;
}
.dashboard {
display: flex;
gap: 15px;
margin-bottom: 20px;
}
.panel {
border: 1px dashed var(--neon-green);
padding: 15px;
flex: 1;
transition: border-color 0.5s;
display: flex;
flex-direction: column;
}
.control-group {
margin-bottom: 15px;
}
input[type=range] {
width: 100%;
accent-color: var(--neon-green);
cursor: ew-resize;
transition: accent-color 0.5s;
}
.data-value {
font-size: 1.2em;
font-weight: bold;
display: inline-block;
margin-top: 5px;
letter-spacing: 2px;
}
.status-box {
text-align: center;
font-size: 1.2em;
font-weight: bold;
padding: 10px;
border: 2px solid var(--neon-green);
margin-bottom: 20px;
transition: all 0.5s ease;
}
.blue-mode {
color: #0088ff !important;
border-color: #0088ff !important;
text-shadow: 0 0 10px #0088ff;
box-shadow: 0 0 15px rgba(0, 136, 255, 0.4);
animation: pulse-blue 1s infinite alternate;
}
@keyframes pulse-blue {
0% { opacity: 1; }
100% { opacity: 0.8; }
}
canvas {
background-color: #001100;
border: 1px solid var(--neon-green);
width: 100%;
height: 200px;
background-image:
linear-gradient(var(--grid-color) 1px, transparent 1px),
linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
background-size: 20px 20px;
transition: border-color 0.5s;
margin-bottom: 20px;
}
.code-block {
background: rgba(0,0,0,0.5);
padding: 10px;
border: 1px solid var(--neon-green);
font-size: 0.9em;
margin-top: auto;
transition: border-color 0.5s;
}
/* SCROLLING TERMINAL STYLES */
.terminal-container {
border: 1px solid var(--neon-green);
background: rgba(0, 15, 0, 0.8);
height: 150px;
overflow-y: auto; /* Activeert de scrollbar */
padding: 10px;
font-size: 0.9em;
transition: border-color 0.5s;
display: flex;
flex-direction: column;
gap: 4px;
}
/* Aangepaste scrollbar voor CRT look */
.terminal-container::-webkit-scrollbar {
width: 10px;
}
.terminal-container::-webkit-scrollbar-track {
background: #001100;
border-left: 1px solid var(--neon-green);
}
.terminal-container::-webkit-scrollbar-thumb {
background: var(--neon-green);
}
.log-entry {
opacity: 0.8;
transition: opacity 0.3s;
}
.log-entry:last-child {
opacity: 1;
font-weight: bold;
}
.log-match {
color: #0088ff;
text-shadow: 0 0 5px #0088ff;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<span>VORTEX // CRYPTOGRAFISCHE CASCADE MONITOR</span>
<span>NODE: LAREN ↔ ANTIPODE</span>
</div>
<div class="status-box" id="statusBox">
[ MODE: STANDBY // AWAITING BLUE STATE ]
</div>
<div class="dashboard">
<div class="panel">
<h3>// OMGEVINGSINPUT (n=8, m=4)</h3>
<div class="control-group">
<label>S-VECTOR MANUAL OVERRIDE</label>
<input type="range" id="sSlider" min="0" max="255" step="1" value="170">
<span class="data-value" id="sSliderDisplay" style="font-size: 1em;">170</span>
</div>
<div class="code-block">
p = s ⊕ e<br>
q = s[:m] + e[m:]<br>
blue iff q[:m][1:] == q[m:][:-1]
</div>
</div>
<div class="panel">
<h3>// BITSTREAM TELEMETRIE</h3>
<div>S: <span class="data-value" id="sBits">00000000</span></div>
<div>E: <span class="data-value" id="eBits">00000000</span> <small>(Auto-Shift)</small></div>
<div>P: <span class="data-value" id="pBits">00000000</span></div>
</div>
<div class="panel">
<h3>// Q-VECTOR ANALYSE</h3>
<div>Q: <span class="data-value" id="qBits">00000000</span></div>
<div>L: <code>q[:m][1:]</code> = <span class="data-value" id="lSlice">000</span></div>
<div>R: <code>q[m:][:-1]</code> = <span class="data-value" id="rSlice">000</span></div>
<div id="condResult" style="margin-top: 10px; font-weight: bold; color: var(--alert-red);">[ MATCH: FALSE ]</div>
</div>
</div>
<div>
<h3>// OSCILLOSCOOP WERKVELD (S, E, P)</h3>
<canvas id="oscilloscope" width="910" height="200"></canvas>
</div>
<div>
<h3>// CASCADE LOG STREAM</h3>
<div class="terminal-container" id="terminalLog">
<div class="log-entry">> Systeem geïnitialiseerd. Wachten op datastroom...</div>
</div>
</div>
</div>
<script>
const canvas = document.getElementById('oscilloscope');
const ctx = canvas.getContext('2d');
const sSlider = document.getElementById('sSlider');
const sSliderDisplay = document.getElementById('sSliderDisplay');
const terminalLog = document.getElementById('terminalLog');
const root = document.documentElement;
let time = 0;
let isBlue = false;
let e_int = Math.floor(Math.random() * 256);
// Functie om nieuwe regels aan de terminal toe te voegen en te scrollen
function addLogEntry(S, E, P, q_str, isMatch) {
const entry = document.createElement('div');
// Creëer een timestamp (HH:MM:SS)
const now = new Date();
const timeStr = now.toTimeString().split(' ')[0];
let status = isMatch ? "[CASCADE: TRUE]" : "[STANDBY]";
entry.innerText = `> [${timeStr}] S:${S.toString().padStart(3,'0')} ⊕ E:${E.toString().padStart(3,'0')} = P:${P.toString().padStart(3,'0')} | Q-VEC:${q_str} ${status}`;
if (isMatch) {
entry.className = "log-entry log-match";
} else {
entry.className = "log-entry";
}
terminalLog.appendChild(entry);
// Beperk het aantal regels tot 100 om geheugen te besparen
if (terminalLog.children.length > 100) {
terminalLog.removeChild(terminalLog.firstChild);
}
// AUTO-SCROLL naar beneden!
terminalLog.scrollTop = terminalLog.scrollHeight;
}
// Functie om de bitwise wiskunde uit te voeren
function updateLogic(triggeredBySlider = false) {
const n = 8;
const m = n / 2; // m = 4
let S = parseInt(sSlider.value);
let E = e_int;
let P = S ^ E;
let s_str = S.toString(2).padStart(n, '0');
let e_str = E.toString(2).padStart(n, '0');
let p_str = P.toString(2).padStart(n, '0');
let q_str = s_str.substring(0, m) + e_str.substring(m, n);
let q_left = q_str.substring(0, m);
let q_right = q_str.substring(m, n);
let left_slice = q_left.substring(1);
let right_slice = q_right.substring(0, m - 1);
isBlue = (left_slice === right_slice);
// UI UPDATES
sSliderDisplay.innerText = S;
document.getElementById('sBits').innerText = s_str;
document.getElementById('eBits').innerText = e_str;
document.getElementById('pBits').innerText = p_str;
document.getElementById('qBits').innerText = q_str;
document.getElementById('lSlice').innerText = left_slice;
document.getElementById('rSlice').innerText = right_slice;
const statusBox = document.getElementById('statusBox');
const condResult = document.getElementById('condResult');
if (isBlue) {
// BLUE STATE
root.style.setProperty('--neon-green', '#0088ff');
root.style.setProperty('--alert-red', '#0055aa');
root.style.setProperty('--grid-color', 'rgba(0, 136, 255, 0.15)');
statusBox.innerText = "[ MODE: BLUE VORTEX ACTIVE / CONDITION MET ]";
statusBox.className = "status-box blue-mode";
condResult.innerText = "[ MATCH: TRUE ]";
condResult.style.color = "#0088ff";
} else {
// STANDARD STATE
root.style.setProperty('--neon-green', '#00ff41');
root.style.setProperty('--alert-red', '#ff003c');
root.style.setProperty('--grid-color', 'rgba(0, 255, 65, 0.1)');
statusBox.innerText = "[ MODE: STANDBY // AWAITING BLUE STATE ]";
statusBox.className = "status-box";
condResult.innerText = "[ MATCH: FALSE ]";
condResult.style.color = "var(--alert-red)";
}
// Log de verandering (om te voorkomen dat de slider 100x per seconde logt, loggen we alleen bij timer of loslaten)
if (!triggeredBySlider) {
addLogEntry(S, E, P, q_str, isBlue);
}
}
// Roteer E-vector elke 1.5s en log het
setInterval(() => {
e_int = Math.floor(Math.random() * 256);
updateLogic(false);
}, 1500);
// Update osciloscoop etc tijdens het slepen
sSlider.addEventListener('input', () => updateLogic(true));
// Log de status handmatig als je de slider LOSLAAT
sSlider.addEventListener('change', () => {
const n = 8, m = 4;
let S = parseInt(sSlider.value);
let s_str = S.toString(2).padStart(n, '0');
let e_str = e_int.toString(2).padStart(n, '0');
let q_str = s_str.substring(0, m) + e_str.substring(m, n);
addLogEntry(S, e_int, S ^ e_int, q_str, isBlue);
});
function drawWave(yOffset, frequency, amplitude, color, jitterLevel, isPulse) {
ctx.beginPath();
ctx.strokeStyle = color;
ctx.lineWidth = 2;
for (let x = 0; x < canvas.width; x++) {
let jitter = (Math.random() - 0.5) * jitterLevel;
let wave;
if (isPulse) {
wave = Math.sin((x + time) * frequency) + Math.sin((x + time) * frequency * 2.5);
wave = wave > 0 ? amplitude : -amplitude;
} else {
wave = Math.sin((x + time) * frequency) > 0 ? amplitude : -amplitude;
}
ctx.lineTo(x, yOffset + wave + jitter);
}
ctx.stroke();
}
function draw() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
let baseFreq = isBlue ? 0.08 : 0.02;
let jitter = isBlue ? 8 : 1;
let timeStep = isBlue ? 5 : 2;
let computedColor = getComputedStyle(root).getPropertyValue('--neon-green').trim();
drawWave(40, baseFreq, 20, computedColor, jitter, false); // S
drawWave(100, baseFreq * 1.2, 20, computedColor, jitter, false); // E
drawWave(160, 0.03, 20, computedColor, jitter, true); // P
time += timeStep;
requestAnimationFrame(draw);
}
// Init
updateLogic(false);
draw();
</script>
</body>
</html>