Skip to content

Commit 3d60dec

Browse files
committed
roll back some overlay changes
1 parent acd972d commit 3d60dec

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

assets/scripts/effects.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,17 @@ function rgbToHex(color){
4747
return hex;
4848
}
4949
const fontHex = rgbToHex(asciiStyle.color)
50+
ctx.fillStyle = fontHex
51+
5052
window.setInterval(() => {
5153
ctx.clearRect(0, 0, overlay.width, overlay.height)
52-
for(let i = 0; i < overlay.height / h; i++) {
53-
for(let j = 0; j < overlay.width / w; j++) {
54-
let alpha = Math.floor(i / (overlay.height / h) * 255).toString(16)
55-
if(alpha.length == 1) {
56-
alpha = '0' + alpha
57-
}
58-
ctx.fillStyle = `${fontHex}${alpha}`
59-
ctx.fillText(choose(overlayChars), j * w, (i + 1) * h);
54+
for(let i = 0; i < screenHeightChars; i++) {
55+
for(let j = 0; j < screenWidthChars; j++) {
56+
57+
ctx.fillText(choose(overlayChars), w * j, (h) * (i + 1))
6058
}
6159
}
62-
}, 1000/5)
60+
}, 1000/8)
6361

6462
function setOptimizedInterval(element, render, tps) {
6563
render()

0 commit comments

Comments
 (0)