- commit
- e7afacc6ee0086f3ba16d8008a21e1e3fa902dd8
- parent
- 098f59d4a77397a2168a3528c242448203e6cece
- author
- dami <gazey55@gmail.com>
| M | site/ | 12 | +++++++----- |
@@ -432,21 +432,23 @@ function drawFocus(
432432 const colour = h >= 0 ? agentColour(h, theme, true) : theme.muted;433433 ctx.save();434434 ctx.lineCap = "round";435- // a faint bar along each line435+ // a thin line along each line of the tile: all of them in one path436+ // and one stroke, so a crossing is painted once (stroking each line437+ // separately at low alpha stacked into a darker cross)436438 ctx.strokeStyle = colour;437- ctx.globalAlpha = 0.16;438- ctx.lineWidth = Math.max(2, scale * 0.16);439+ ctx.globalAlpha = 0.22;440+ ctx.lineWidth = Math.min(3, Math.max(1, scale * 0.05));441+ ctx.beginPath();439442 for (const run of tileLines(t, mask)) {440443 const a = run[0], b = run[run.length - 1];441444 const ax = ox + (t.x0 + a % t.w + 0.5) * scale;442445 const ay = oy + (t.y0 + Math.floor(a / t.w) + 0.5) * scale;443446 const bx = ox + (t.x0 + b % t.w + 0.5) * scale;444447 const by = oy + (t.y0 + Math.floor(b / t.w) + 0.5) * scale;445- ctx.beginPath();446448 ctx.moveTo(ax, ay);447449 ctx.lineTo(bx, by);448- ctx.stroke();449450 }451+ ctx.stroke();450452 // pins: the overlaps an alternative solution differs on, marked on451453 // their shared cells452454 ctx.globalAlpha = 0.5;