Live timing page: connect and show the running order #20
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#21 Timing colours and fastest lap
mintopia/blur
#23 Mod icons
mintopia/blur
Reference
mintopia/blur#20
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
A static page in
examples/live-timing/connects to the feed (?ws=URL parameter, default port 9000) and shows the running order as an F1-style timing screen.LAP n / N, race clock. The clock is the leader'srace_msfromstandings, frozen at the winner's time once the leader finishes.position: POS, colour stripe (stable hash of the name; AI grey), RACER (name in caps with ellipsis, car in grey after it; AI racers asCPU 07dimmed; the local racer gets aYOUtag, a yellow left edge bar and a slightly lighter row), GAP (to leader;LEADERon the leader;+1 LAPwhen a lap or more down, fromdist), INT (to the car ahead), LAST LAP, BEST LAP, LAP, MPH.#8a8a8a) withSTOPPEDafter the car. No red for stopped racers.ws_tap.py, now untracked underwork/ws-capture/):record <port> <out.jsonl>andplay <in.jsonl> <port> [speed]. A recorded race played into the page is the demo and test path; the page has no replay mode of its own.BLUR_STATE_WS, open the page, record and replay.Acceptance criteria
CPU nn; the local racer is marked YOU; a stopped racer is grey with STOPPEDws_tap.pyis committed and a capture played with it drives the page end to endBlocked by
None (can start immediately)
Target design (final mockup v7, random data; the milestone tickets fill in the colours, sectors, icons and classification):
Implemented in commit
8d84a26on harmonic/task-25:examples/live-timing/hasindex.html(single static page,?ws=port or URL, default 9000), offline Titillium Web woff2 subsets + OFL.txt,ws_tap.py(record/play) and a README. Verified in headless Chrome against a played-back capture and a synthetic 20-racer feed: all rows fit at 1280x800 and 1920x1080; CPU nn / YOU tag / STOPPED grey rendering; red bar when the feed is down (reconnect every 2s); Waiting for race state; record then play round-trip works. Notes: finished racers are not marked STOPPED; track name uses the undocumentedtrack_namekey, falling back to a prettifiedtrack. I did not test killing and restarting the feed against a live page.Completed and merged by Harmonic (task 25).