Skip to content

Fix around_player arc + finer dribble line (reference-driven) - #17

Merged
OliEder merged 4 commits into
mainfrom
feat/dribble-around-tuning
Aug 29, 2026
Merged

OliEder merged 4 commits into
mainfrom
feat/dribble-around-tuning

Conversation

@OliEder

@OliEder OliEder commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Addresses the two rendering problems seen on the live Try-it page, tuned against a real coaching drill PDF (3-man Fastbreak) as the reference.

Problem (from screenshots)

  1. Dribble waves too big — the serpentine dominated the line instead of reading as a dribble texture.
  2. around_player broken — the cut ran through the player and brushed past with an unnatural flat kink, because the single detour waypoint sat ~0.35–0.9 court units from the obstacle centre while the player symbol radius is 0.5 (so tight landed inside the symbol).

Fix

around_player — clear the player, round the corner:

  • Arc distances are now player-radius-relative: tight ≈ 0.85, normal ≈ 1.2, wide ≈ 1.7 (symbol radius 0.5 + a per-arc gap), so the detour actually clears the player.
  • The single waypoint becomes a rounded 3-point arc — approach, apex (beside the player on the author-chosen side), exit — that keeps the overall heading (start → destination). No more kink, no more cutting through the symbol.

dribble line — a texture, not a serpentine:

  • Amplitude 0.4 → 0.22, wavelength 1.8 → 1.1: small, regular waves along the path, matching how coaching tools draw dribbles.

Before / after

Verified with rendered screenshots: the curl-around-a-screen cut now arcs cleanly around the player (was: straight through it), and the 3v2 dribble reads as a fine dribble (was: giant waves).

Also

  • Adds scripts/shoot-fixture.mjs — a dev helper to render any fixture to a PNG for reference-driven tuning (screenshots are gitignored).
  • Adds the around-player-arc fixture; updates the visual snapshot baselines.
  • 149 tests pass, tsc --noEmit clean.

Leaving the merge to you. The site auto-picks this up once it's released (0.5.0) via the sync-tool-version automation — or bump the pin manually.

🤖 Generated with Claude Code

…nce-driven)

Tuned against a real coaching drill PDF (3-man Fastbreak):
- around_player: arc distances are now player-radius-relative (symbol radius 0.5
  + gap: tight~0.85 / normal~1.2 / wide~1.7) so the detour clears the player
  instead of cutting through the symbol; and the single waypoint becomes a
  rounded 3-point arc (approach, apex beside the player on the chosen side, exit)
  that keeps the overall heading — no more kink or brushing through the player.
- dribble line: smaller, more regular waves (amplitude 0.4->0.22, wavelength
  1.8->1.1) so it reads as a dribble texture along the path, not a big serpentine.

Adds a dev screenshot helper (scripts/shoot-fixture.mjs) for reference-driven
tuning, and the around-player-arc fixture. Visual baselines updated. 149 tests
pass; tsc clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment thread scripts/shoot-fixture.mjs
const server = createServer((req, res) => {
const urlPath = decodeURIComponent(req.url.split("?")[0]);
const filePath = join(root, urlPath);
if (!existsSync(filePath)) { res.writeHead(404); res.end("not found"); return; }
Comment thread scripts/shoot-fixture.mjs
const filePath = join(root, urlPath);
if (!existsSync(filePath)) { res.writeHead(404); res.end("not found"); return; }
res.writeHead(200, { "Content-Type": MIME[extname(filePath)] ?? "application/octet-stream" });
res.end(readFileSync(filePath));
Oliver-Marcus Eder and others added 3 commits August 29, 2026 18:05
Reference-checked against the drill PDFs (Outlet, Pick&Roll, 2-man Fastbreak):
0.22/1.1 read a touch too faint/tight; 0.3/0.9 gives clearer, regular zig-zag
crests that match how the reference tools draw dribbles. Visual baselines updated.
CodeQL flagged 'uncontrolled data used in path expression' (High): the dev
screenshot server built the file path from the request URL and read it, so a
crafted ../ path could escape the served root. Resolve within root and reject
any resolved path that falls outside it. Verified: legit paths serve, traversal
attempts get 403, rendering still works.
@OliEder
OliEder merged commit da86372 into main Aug 29, 2026
4 of 5 checks passed
@OliEder
OliEder deleted the feat/dribble-around-tuning branch August 29, 2026 17:06
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