The live demo starts when it’s in view.Again (Enter) plays another made-up run · watch the best and the deck change
The end of a game run that makes people want one more.
The end of a game run that makes people want one more: a headline and sentences the game writes from its own facts (numbers as words, durations, lists), the score with "New best" and what it was, the route on a small chart, the run as a timeline (how busy it was as a hill over the clock, stages as bands, levels, hits and surges as shapes along it), a deck of the last runs, and one key to go again. Markers differ in shape as well as colour, both charts have their facts in words for screen readers, and the best is kept in wrapped browser storage that a private window survives.
Measured 21 November 2026 on RTX 4060 Laptop, 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 157, 1920×1080 at 1×. 600 frames × 3 rounds, median kept (rounds ranged CPU <0.01–<0.01 ms). What ran: Alone: the end screen built and drawn (route on Canvas 2D, timeline in SVG); a bench step plays another run, which rebuilds it. Phones: tiers are being measured next.
How steadily it runs on RTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900H · reference
Typical frame ?
16.78 ms
1% low ?
44 fps
Varies by ?
±0.86 ms
All metricsRTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900H · referenceHow long each frame took. Most frames sit in the tall bars; a long tail to the right is hitching.
Frames run on a 60 Hz timer (a page demo), so most frames take about one tick, 16.7 ms: the spread around it is what matters.
Frames
Median (p50) ?
16.78 ms
p95 ?
18.08 ms
p99 ?
20.72 ms
Slowest ?
26.32 ms
Mean ?
16.95 ms
Standard deviation ?
0.86 ms
1% low ?
44 fps
0.1% low ?
38 fps
Hitches ?
0 of 600
Over budget ?
1 of 600
Main thread
Long tasks ?
0
Long frames ?
0
Event-loop delay ?
0.1 / 1.2 / 1.9 ms
Input
Interactions ?
2
Input to paint ?
7.0 ms, worst 10.4
Longest handler ?
under 16 ms
Memory
JavaScript heap ?
33.7 → 34.2 MB
Growth ?
+0.51 MB
Browser
JavaScript a frame ?
0.11 ms
All tasks a frame ?
0.29 ms
Layout / style ?
0.00 / 0.00 ms
Main thread busy ?
2%
Garbage collection
Collections ?
0 (0 minor, 0 major)
Pauses ?
0.0 ms in all, longest 0.0
What it needs
Renders with
DOM and CSSPlain DOM and CSS: every current browser.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages
With an agent
install("run-summary")Your coding agent reads its pitfalls and installs it through the library’s MCP server. Set it up
What it’s for
The end screen of an arcade, survival or roguelite run
A high score kept between visits, with the last few runs
A route map of where the player went, with events marked
A timeline of a session: how busy, what happened when
Any summary that should read as words, not only numbers
Pitfalls, in brief
Record what the summary needs while the run plays, not after: a point of the route every half second (x, y pairs), how busy it is on a fixed beat, and each event with its time and place.
The words are yours, built from the run’s facts with the helpers (numberWord, duration, list, plural).
Markers differ in shape as well as colour (ring, cross, triangle, star, diamond, square): give each kind a different shape in your MarkKinds, not only a different tone.
The route is drawn on Canvas 2D with the tokens’ colours read at draw time: call redraw() when the theme or look changes, and after the dialog is in the page (a canvas measured while hidden has no width).
keepRun writes to localStorage inside try/catch: in a private window or with storage blocked it still returns a result (the best is then this run), and the game plays on.
2 more in brief
"New best" shows only when a previous best existed and this run beat it, so a first run is not celebrated as a record.
Put the summary in a dialog that takes focus to the primary action (Again) and make Enter and a pad’s A press it; the title has tabindex="-1" for a dialog that would rather start reading at the heading.
7 pitfalls in full, the hook-up guide, the module source and its tests come with the part.
Where it comes from
From another of the maker’s apps. Fully custom code.
game overresults screenscorehigh scoreroute maptimelinechartsvgcanvas 2dgenerated textlocalstorageaccessibilitygame uidomno dependencies
Swipe a list row, as on a phone: a short swipe shows its buttons, a long one runs the outer action (delete), a quick flick opens and a flick back closes.