style: Zeiger-Linien im Hero-Netz kräftiger

Größere Reichweite (170 px), dickere und deckendere orange Linien,
ein Punkt markiert den Zeiger.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MBO-Tech-IT 2026-11-04 13:51:55 +01:00
parent af835e1c3c
commit 2abfe5721a
1 changed files with 12 additions and 4 deletions

View File

@ -174,23 +174,31 @@ export default function NetField() {
// Zeiger: kurze Verbindungen zu nahen Punkten
if (pointer) {
const reach = 170;
ctx.lineWidth = 1.75;
ctx.strokeStyle = orange;
for (let i = 0; i < nodes.length; i++) {
const d = Math.hypot(P[i][0] - pointer.x, P[i][1] - pointer.y);
if (d > 130) continue;
ctx.globalAlpha = (1 - d / 130) * 0.5;
ctx.strokeStyle = orange;
if (d > reach) continue;
ctx.globalAlpha = 0.25 + (1 - d / reach) * 0.7;
ctx.beginPath();
ctx.moveTo(pointer.x, pointer.y);
ctx.lineTo(P[i][0], P[i][1]);
ctx.stroke();
}
ctx.globalAlpha = 1;
ctx.fillStyle = orange;
ctx.beginPath();
ctx.arc(pointer.x, pointer.y, 3, 0, Math.PI * 2);
ctx.fill();
ctx.lineWidth = 1;
ctx.strokeStyle = blue;
}
// Punkte
for (let i = 0; i < nodes.length; i++) {
const n = nodes[i];
const near = pointer ? Math.max(0, 1 - Math.hypot(P[i][0] - pointer.x, P[i][1] - pointer.y) / 130) : 0;
const near = pointer ? Math.max(0, 1 - Math.hypot(P[i][0] - pointer.x, P[i][1] - pointer.y) / 170) : 0;
const r = n.r * (1 + near * 0.6);
if (n.hub) {
ctx.globalAlpha = 0.25 + 0.15 * Math.sin(t * 1.4 + n.ph);