Horizon Engine Script
finally got the fuckass script detection thing working with javascript, i just need to replace every bracket with the appropriate entity
This is the script that is used for the little effect your seeing at the top and bottom of the site.
// Horizon Engine
<script>
const roofElem = document.getElementById('roof');
const floorElem = document.getElementById('floor');
// Config (play with these numbers and strings and have some fun)
const width = 208;
const sideHeight = 12;
const chars = " `.-':_,^=;><+!rc*/z?sLTv)J7(|Fi{C}fI31tlu[neoZ5Yxjya]2ESwqkP6h9d4VpOGbUAKXHm8RD#$Bg0MNWQ%&@";
let frame = 0;
function generateFrame(isRoof) {
let output = "";
const speed = 0.05; // horizon speed
for (let y = 0; y < sideHeight; y++) {
let row = "";
const distToLogo = isRoof ? (sideHeight - y) : (y + 1);
const z = 10 / distToLogo;
const direction = isRoof ? 1 : -1; // dir inversion for roof and floor
const offset = frame * speed * direction;
for (let x = 0; x < width; x++) {
const centeredX = (x - width / 2);
const u = Math.floor((centeredX * z) + offset);
const v = Math.floor(z * 1 + offset);
row += chars[Math.abs(u + v) % chars.length];
}
output += row + "\n";
}
return output;
}
function animate() {
roofElem.textContent = generateFrame(true);
floorElem.textContent = generateFrame(false);
frame++;
requestAnimationFrame(animate);
}
animate();
</script>