// circuit.jsx — Abstract circuit grid SVG (nodes + traces) for the hero. // Procedural so it doesn't look hand-drawn-pretty. Echoes the dog logo. function CircuitGrid({ density = "regular", className = "" }) { // build a deterministic-ish set of nodes and traces const cols = density === "dense" ? 14 : density === "sparse" ? 8 : 11; const rows = density === "dense" ? 9 : density === "sparse" ? 5 : 7; const W = 1200, H = 700; const cellW = W / (cols + 1); const cellH = H / (rows + 1); // PRNG (mulberry32) seeded for stability const seed = density === "dense" ? 7331 : density === "sparse" ? 24 : 1337; let s = seed; const rand = () => { s |= 0; s = s + 0x6D2B79F5 | 0; let t = Math.imul(s ^ s >>> 15, 1 | s); t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t; return ((t ^ t >>> 14) >>> 0) / 4294967296; }; const nodes = []; for (let r = 1; r <= rows; r++) { for (let c = 1; c <= cols; c++) { if (rand() < 0.55) { nodes.push({ x: c * cellW + (rand() - 0.5) * cellW * 0.25, y: r * cellH + (rand() - 0.5) * cellH * 0.25, r: 1.6 + rand() * 1.8, pulse: rand() < 0.18, delay: rand() * 4, }); } } } // Orthogonal traces between random pairs const traces = []; for (let i = 0; i < nodes.length; i++) { if (rand() < 0.45) { const a = nodes[i]; const b = nodes[Math.floor(rand() * nodes.length)]; if (!b || a === b) continue; const dx = b.x - a.x, dy = b.y - a.y; if (Math.abs(dx) + Math.abs(dy) > 220) continue; const midX = rand() < 0.5 ? b.x : a.x; traces.push(`M ${a.x} ${a.y} L ${midX} ${a.y} L ${midX} ${b.y} L ${b.x} ${b.y}`); } } return ( ); } window.CircuitGrid = CircuitGrid;