-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmatrix.js
More file actions
34 lines (27 loc) · 1.47 KB
/
Copy pathmatrix.js
File metadata and controls
34 lines (27 loc) · 1.47 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
const canvas = document.getElementById('matrixCanvas');
const ctx = canvas.getContext('2d');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
const letters = Array(256).join(1).split('');
ctx.font = '20px monospace'; // Adjust font size here as well
function draw() {
ctx.fillStyle = 'rgba(0, 0, 0, 0.05)';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = '#0F0';
letters.map((y_pos, index) => {
const text = String.fromCharCode(65 + Math.random() * 33);
const x_pos = index * 20; // Adjust spacing according to new font size
ctx.fillText(text, x_pos, y_pos);
letters[index] = y_pos > canvas.height + Math.random() * 1e4 ? 0 : y_pos + 20; // Adjust step according to new font size
});
}
setInterval(draw, 33);
document.getElementById('loginForm').addEventListener('submit', function(e) {
e.preventDefault();
document.getElementById('loginWindow').style.display = 'none';
document.getElementById('loadingScreen').style.display = 'flex';
setTimeout(() => {
document.getElementById('loadingScreen').style.display = 'none';
document.getElementById('successScreen').style.display = 'flex';
}, 3000); // Show loading screen for 3 seconds
});