
const c=document.getElementById("pcbCanvas"),ctx=c.getContext("2d");
function r(){c.width=innerWidth;c.height=innerHeight}r();addEventListener("resize",r);
const cx=()=>c.width/2,cy=()=>c.height/2;
let t=[];for(let i=0;i<140;i++)t.push({x:Math.random()*c.width,y:Math.random()*c.height,tx:cx()+(Math.random()-.5)*700,ty:cy()+(Math.random()-.5)*420,s:.003+Math.random()*.004});
(function d(){ctx.clearRect(0,0,c.width,c.height);ctx.fillStyle="rgba(255,0,0,.12)";ctx.fillRect(cx()-90,cy()-55,180,110);
ctx.strokeStyle="rgba(255,0,0,.35)";ctx.lineWidth=2;ctx.shadowBlur=14;ctx.shadowColor="red";
t.forEach(e=>{e.x+=(e.tx-e.x)*e.s;e.y+=(e.ty-e.y)*e.s;ctx.beginPath();ctx.moveTo(e.x,e.y);ctx.lineTo(e.tx,e.ty);ctx.stroke()});
requestAnimationFrame(d)})();
