mirror of
https://github.com/sbuffkin/hexmaker.git
synced 2026-07-22 06:14:01 +00:00
Resize handles live inside the scaled bg-image (~4.8×) / grid (~0.35×) layers, but --duckmage-cal-scale only cancelled the viewport zoom, so image handles rendered ~5× too large and grid handles too small. updateCalHandleScale() now sets the var per layer to 1/(zoom × layerScale) so handles stay a constant on-screen size at any zoom/scale. Calibration drag/resize/arrow-nudge was paint-bound at ~2fps: moving or scaling the grid re-rasterises all 3843 clip-path hex cells every frame (a probe showed ~0.05ms JS work vs ~540ms frame gaps). During an active adjustment we now swap the cells for a single pre-drawn <canvas> colour snapshot (buildCalibrationSnapshot) — transforming one canvas is a single composite op — and drop icons/labels/the SVG outline. Mouse drags coalesce moves to one rAF tick and tear down on mouseup; arrow-key nudges use a bake-on-quiet settle timer (no mouseup to end on). Adds a dev-gated drag probe (window.DUCKMAGE_PERF) and dev/cal-handle-size-check. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| bg-hex-alignment-sandbox.html | ||
| bg-hex-recalc-bench.html | ||
| bg-hex-recalc-bench.mjs | ||
| cal-handle-size-check.html | ||
| calibration-outline-overlay-sandbox.html | ||
| coord-label-thrash-bench.html | ||
| coord-label-thrash-bench.mjs | ||
| coord-slip-sandbox.html | ||
| hex-calibration-sandbox.html | ||
| screenshot-approaches.mjs | ||
| snapshot-bg-hex-alignment.mjs | ||
| snapshot-calibration-outline.mjs | ||
| snapshot-coord-slip.mjs | ||