Make minStep jitter handling more dynamic.

This commit is contained in:
Yaro Kasear 2026-01-14 11:37:00 -06:00
parent 27a29d9c66
commit 059d5ee9ba

View file

@ -1562,7 +1562,8 @@ function initGridWidget(root, opts = {}) {
if (pts.length >= 2) {
const coarse = [pts[0]];
const minStep = 0.02;
const minStepPx = 0.75;
const minStep = minStepPx / cellSize;
for (let i = 1; i < pts.length; i++) {
if (dist2(pts[i], coarse[coarse.length - 1]) >= minStep * minStep) {
coarse.push(pts[i]);