boards
Leaderboard views for scoreKit: pure functions that turn a BoardData (see demo.module) into a UI widget tree in any of the five theme looks (arcade, minimal, scifi, fantasy, cartoon). Displays, HUD screens and in-level sign panels call Boards.render(id, look, board, { w, h, t, narrow }) and register the node they get back. Every view highlights the local player, tags rows set this session as NEW, shows the board's save status as a small chip (held/retrying/offline in a warning colour), handles an empty board with a friendly "No scores yet — be the first!", and switches to a single-column phone layout below 520 points wide.
| id | view |
|---|---|
top10 | Top 10 table: medal ranks, avatar, name, stars + grade, value; your row pinned under a divider when you're outside the top 10. |
podium | Top three on stepped podium blocks (1st centre, crowned), 4th–8th as a compact list. |
aroundMe | Your rank as a hero ring (#17 of 214, top 8%), your neighbours with their gaps, and "+320 to pass Kip". |
bestTimes | Fastest first under a stopwatch: the track record card, then every time with its gap to first and a gap bar. |
seasons | This season's standings under a season badge, beside a hall of champions (past seasons' top three). |
sign | An opaque in-level sign for a world-space panel: arcade marquee with chasing bulbs, LED panel, holo-board, wooden notice board with nails, chalkboard. Top 5 in big type. |
Boards.views lists each view with its natural size and tags; Boards.ids() and Boards.get(id) read it. opts.t (seconds since the board appeared) drives entrances, count-ups and idle shimmer, so the output depends only on its inputs.
Scoped to this part · feeds back into the world's score.