{ if (!ontarget || !canvas) return; const rect = canvas.getBoundingClientRect(); mouse = { x: (e.clientX - rect.left) * (width / rect.width), y: (e.clientY - rect.top) * (height / rect.height) }; }} onpointerleave={() => (mouse = null)}>