-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbinary_tx_flashWarning.html
More file actions
65 lines (58 loc) · 1.81 KB
/
Copy pathbinary_tx_flashWarning.html
File metadata and controls
65 lines (58 loc) · 1.81 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Binary Flash Transmission</title>
<style>
body { margin: 0; overflow: hidden; background: black; }
canvas { display: block; }
</style>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/three@0.157.0/build/three.min.js"></script>
<script>
// Binary sequence (first half of SHA-256 hash)
const bits = [
'11000000','00001001','10100111','00011000',
'11011001','00111110','11011101','11000100',
'00001001','10011101','10111001','00111100',
'10001001','10011001','01011111','10101000',
'11101101','00011101','10101111','10100010',
'01011010','01100000','00010100','10101100',
'01100000','01010011','11100001','11110110',
'10110110','01101101','00010100','01101101'
].join('').split('');
let camera, scene, renderer;
let flashPlane;
let bitIndex = 0;
const bitDuration = 100; // ms
init();
animate();
function init() {
scene = new THREE.Scene();
camera = new THREE.PerspectiveCamera(75, window.innerWidth/window.innerHeight, 0.1, 10);
camera.position.z = 1;
flashPlane = new THREE.Mesh(
new THREE.PlaneGeometry(2, 2),
new THREE.MeshBasicMaterial({ color: 0x000000 })
);
scene.add(flashPlane);
renderer = new THREE.WebGLRenderer({ antialias: false });
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
setInterval(() => {
if (bitIndex >= bits.length) {
flashPlane.material.color.set(0x888888); // End: gray
return;
}
const bit = bits[bitIndex++];
flashPlane.material.color.set(bit === '1' ? 0xffffff : 0x000000);
}, bitDuration);
}
function animate() {
requestAnimationFrame(animate);
renderer.render(scene, camera);
}
</script>
</body>
</html>