Make hacker cursor trails visible on all desktop deck pages.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

Remove Command-Deck-only gating, boost 0/1 particle intensity, add crosshair cursor, and relabel the settings toggle so operators can find the effect.
This commit is contained in:
AetherForge
2026-06-08 19:53:06 -07:00
parent 6ab43a468b
commit 9a884a80b6
6 changed files with 47 additions and 27 deletions

View File

@@ -3,9 +3,9 @@ import './CursorFire.css';
const BIT_CHARS = '01';
const HEX_CHARS = '0123456789ABCDEF';
const MAX_PARTICLES = 280;
const EMIT_PER_FRAME = 5;
const EMIT_WINDOW_MS = 90;
const MAX_PARTICLES = 480;
const EMIT_PER_FRAME = 12;
const EMIT_WINDOW_MS = 140;
const FONT_STACK = '"JetBrains Mono", "Fira Code", "Cascadia Code", monospace';
interface Particle {
@@ -21,18 +21,18 @@ interface Particle {
}
function pickChar(): string {
if (Math.random() < 0.72) return BIT_CHARS[Math.floor(Math.random() * 2)];
if (Math.random() < 0.88) return BIT_CHARS[Math.floor(Math.random() * 2)];
return HEX_CHARS[Math.floor(Math.random() * HEX_CHARS.length)];
}
function colorForLife(life: number, tint: Particle['tint']): string {
const a = Math.min(1, life * 0.92);
const a = Math.min(1, life * 1.05);
if (tint === 'cyan') {
if (life > 0.55) return `rgba(0, 232, 245, ${a})`;
return `rgba(0, 210, 170, ${a * 0.8})`;
if (life > 0.5) return `rgba(0, 255, 255, ${a})`;
return `rgba(0, 240, 200, ${a * 0.92})`;
}
if (life > 0.55) return `rgba(0, 255, 136, ${a})`;
return `rgba(0, 190, 96, ${a * 0.75})`;
if (life > 0.5) return `rgba(80, 255, 160, ${a})`;
return `rgba(0, 255, 120, ${a * 0.9})`;
}
function glowForTint(tint: Particle['tint']): string {
@@ -90,17 +90,17 @@ export default function CursorFire() {
const { x, y } = mouse.current;
for (let i = 0; i < EMIT_PER_FRAME; i++) {
const spread = 10;
const spread = 14;
particles.current.push({
x: x + (Math.random() - 0.5) * spread,
y: y + (Math.random() - 0.5) * (spread * 0.4),
vx: (Math.random() - 0.5) * 1.4,
vy: -(Math.random() * 2.6 + 1.6),
y: y + (Math.random() - 0.5) * (spread * 0.45),
vx: (Math.random() - 0.5) * 1.8,
vy: -(Math.random() * 3.2 + 2.1),
life: 1,
decay: Math.random() * 0.024 + 0.018,
decay: Math.random() * 0.016 + 0.012,
char: pickChar(),
fontSize: Math.random() * 10 + 9,
tint: Math.random() < 0.55 ? 'cyan' : 'green',
fontSize: Math.random() * 16 + 16,
tint: Math.random() < 0.5 ? 'cyan' : 'green',
});
}
@@ -124,10 +124,10 @@ export default function CursorFire() {
p.life -= p.decay;
p.fontSize *= 0.985;
if (p.life <= 0 || p.fontSize < 6) continue;
if (p.life <= 0 || p.fontSize < 8) continue;
alive.push(p);
const glow = 6 + p.life * 10;
const glow = 10 + p.life * 18;
ctx.shadowBlur = glow;
ctx.shadowColor = glowForTint(p.tint);
ctx.font = `600 ${p.fontSize}px ${FONT_STACK}`;