Skip to content

Release: staging to main (v0.6.0)#57

Merged
dancj merged 6 commits into
mainfrom
staging
Jul 4, 2026
Merged

Release: staging to main (v0.6.0)#57
dancj merged 6 commits into
mainfrom
staging

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Proposed release: v0.6.0

Features

github-actions Bot and others added 6 commits June 22, 2026 12:47
chore: sync release v0.5.2 (changelog + version)
…ntrol point

The avoid router measured obstacle clearance against the straight
start->end chord, but the drawn path is a cubic that bows away from that
chord - so a curve could clip a box whose chord cleared it, and no belly
was emitted at all. The belly also displaced both control points equally,
attenuating to zero at the endpoints, so end-adjacent obstacles could
never be cleared regardless of avoidPadding.

routeOffset is replaced by routeBellies: it samples the cubic that will
actually render (chord-scaled density, ~1 per 25px), finds the worst
padded-box penetration, and splits the correction across the two control
points by their Bezier basis weights at the blocker's parameter -
iterating up to 4 times until the resampled curve clears. Exact endpoint
samples are excluded and t* is clamped to the interior so the vanishing
basis weights can't produce NaN or runaway overshoot; displacement is
capped at 1.5x chord length for geometry no single cubic can clear.

The empirical BOW=1.6 amplifier in scroll-arrow is gone - the solver
converges on the displacement actually needed. Existing avoid arrows will
render with minimal rather than 1.6x-amplified bows, so this should ship
in a minor release.

Closes #55
- Raise samplePath's sample cap to 400 so small padded obstacles are
  still detected on page-scale chords (probe: 6000px chord missed a
  straddling box at the old 100-sample cap)
- Make the issue #55 repro test actually fire routing (tight sibling
  pill inside the padded approach) and assert nonzero bellies, so an
  always-zero router fails it
- Test buildPath's per-control belly wiring directly (a b1/b2 swap
  previously passed the whole suite)
- Stub SVGElement getTotalLength in the avoid tests instead of
  swallowing constructor errors with a bare try/catch
- Reuse unitNormal, hoist per-obstacle geometry out of the solver's
  iteration loop, clean up comments, format
feat(avoid): curve-aware detection and per-control-point belly routing
@dancj
dancj merged commit 94bf0bf into main Jul 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant