Skip to content

Claude/app review oy0 ta - #4

Merged
OliEder merged 2 commits into
mainfrom
claude/app-review-Oy0Ta
May 30, 2026
Merged

OliEder merged 2 commits into
mainfrom
claude/app-review-Oy0Ta

Conversation

@OliEder

@OliEder OliEder commented May 30, 2026

Copy link
Copy Markdown
Contributor

No description provided.

claude added 2 commits May 30, 2026 06:18
Curved movement/passing lines were rendered wrong in two ways and dribble
waves bent incorrectly:

- curvedPath built only a half curve for a 3-point line (Q over the first
  span, then a straight L to the end) and offset the control point along the
  angle bisector pointing INTO the bend, so the curve bulged toward the
  inside instead of through the waypoint. Replace with a midpoint-quadratic
  spline: each interior waypoint is the control point and spans join at
  segment midpoints, so the curve passes smoothly through the waypoints and
  bows outward as drawn. Endpoints are preserved.

- dribblingPath computed the wave perpendicular from a segIdx that was never
  advanced (always segment 0), so after a bend the zig-zag pointed the wrong
  way. pointAlongPath now returns the local unit tangent and the wave uses it.

Tests: tests/curves.spec.js asserts the curve geometry (single quadratic with
the waypoint as control, apex on the same side as the waypoint, endpoints and
interior controls preserved) and that dribble waves alternate sides and follow
bends perpendicular to the local segment. The three discriminating cases were
verified to fail on the old implementation. Full suite: 37 passed.
The defender symbol was a filled cubic-Bézier path whose outer and inner
curves bowed the same way, so the fill self-intersected and rendered as two
small crescents at the bottom of the token instead of a horseshoe (Ω).

Replace it with a single thick stroked elliptical arc, open at the bottom,
with the number inside — matching the FIBA convention and reading clearly at
token size. Verified visually by rasterizing the example drills before/after.

Tests: tests/renderer.spec.js asserts the defender is a stroked open arc
(fill="none", stroke=defense color, no Z/C) plus invariants for offense, ball,
coach, court surface, rim and movement/passing line styling. The defender
structure test fails on the pre-fix symbol. Full suite: 46 passed.
@OliEder
OliEder merged commit ac40ccd into main May 30, 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.

2 participants