Skip to content

Commit e6877ce

Browse files
authored
Merge pull request #2 from vrrdnt/claude/revert-background-style-cYsNt
2 parents 9ce76f1 + ad81891 commit e6877ce

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

ascii-bg.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
// Shared tunables
88
const CELL = 20; // grid cell size px
99
const FONT_SZ = 11; // font size px
10-
const MOUSE_R = 440; // mouse glow radius px
11-
const MOUSE_PEAK = 0.46; // max extra alpha near mouse
1210
const FLASH_CHANCE = 0.0004; // probability per cell per frame of triggering a flash
1311
const FLASH_PEAK = 1; // peak alpha of a flash
1412
const FLASH_DECAY = 0.02; // alpha lost per frame during flash decay
@@ -34,7 +32,6 @@
3432

3533
let canvas, ctx;
3634
let cols, rows, cells;
37-
let mouseX = -9999, mouseY = -9999;
3835
let lastTs = 0;
3936
let mode; // 'radiation' | 'gol'
4037

@@ -136,11 +133,7 @@
136133
const cx = col * CELL + CELL * 0.5;
137134
const c = cells[row * cols + col];
138135

139-
// Mouse proximity glow
140-
const md = Math.hypot(cx - mouseX, cy - mouseY);
141-
let a = BASE_A + (md < MOUSE_R
142-
? MOUSE_PEAK * Math.pow(1 - md / MOUSE_R, 1.8)
143-
: 0);
136+
let a = BASE_A;
144137

145138
// Random flash + streak trail
146139
a += c.flash;
@@ -316,11 +309,6 @@
316309

317310
resize();
318311
window.addEventListener('resize', resize);
319-
window.addEventListener('mousemove', (e) => {
320-
mouseX = e.clientX;
321-
mouseY = e.clientY;
322-
});
323-
324312
window.addEventListener('click', (e) => {
325313
if (mode !== 'gol') return;
326314
if (e.target.closest('#bg-toggle')) return;

0 commit comments

Comments
 (0)