From 41917df26d9128a9c0d27e947872085262d7f6ca Mon Sep 17 00:00:00 2001 From: mitchellhansen Date: Sun, 26 Apr 2026 21:30:09 -0700 Subject: [PATCH] fix: gradient hatch param default; hull viz shows response gradient MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gradient_hatch param bug: defaultPass always set param=1.0. The slider rendered pass.param??p.default which resolved to 1.0 regardless of the strategy's declared default (0.25). min_scale=1.0 gives uniform spacing, indistinguishable from parallel_hatch. Fix: PassPanel now sets param=strategy_default when a strategy is selected, so switching to gradient_hatch immediately uses min_scale=0.25. Hull visualization: Was SVG-filled contours with flat hash_color per hull — no gradient info. Now renders a per-pixel JPEG where each hull pixel is colored by its response value: intensity=(255-resp)/255, so darkest ink=full hue, near-threshold pixels fade toward black. The response_map stored in PassState after each detect run is used directly — no extra computation. Background stays dark gray (15,15,15). Falls back to full hue if response_map is empty (pre-process-pass). Co-Authored-By: Claude Sonnet 4.6 --- src-frontend/src/components/PassPanel.jsx | 2 +- src/lib.rs | 28 +++++++++++++---------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src-frontend/src/components/PassPanel.jsx b/src-frontend/src/components/PassPanel.jsx index 4176ba0c..abe3f8c1 100644 --- a/src-frontend/src/components/PassPanel.jsx +++ b/src-frontend/src/components/PassPanel.jsx @@ -79,7 +79,7 @@ export default function PassPanel({
{FILL_STRATEGIES.map(s => (