Frame Lab: Repeatable Performance Benchmarks and Game Charts
README.md
cards
benchKit's results cards: Cards.build(layout, data, opts) turns a report or a sweep result into a widget tree in any look, for any screen, and Cards.show / Cards.hide put it on benchKit's own screens (benchKit.card.<layout>). The layouts are full (the whole results card), badge (a corner badge), phone (a portrait card that fits 390x844), sweep (the settings sweep table) and minutes (the per-minute chart of a sustained run); every number is plain fps or milliseconds. Shown cards hide themselves while the runner measures, so they are never in a measured frame, and Cards.sample(kind) gives clearly marked sample data for previews and tests.
Cards.gallery(layout, data, opts) draws every look side by side: each look's real card in layout, scaled into a captioned thumbnail, in a grid (3 columns on a wide screen, 2 on a narrow one) under a tab row of the five layouts, with the current look (opts.look) outlined. Data of the wrong kind for the layout (or nil) draws sample data, tagged as such. It fits opts.width x opts.height (default the canvas) and scrolls when the grid cannot fit. Cards.showGallery / Cards.hideGallery / Cards.isGalleryShown put it on its own screen, benchKit.cards.gallery, above the cards, and it hides during measured windows like the cards do. Its buttons send benchKit.gallery.layout:<name>, benchKit.gallery.look:<name> and benchKit.gallery.close; Cards.handleGallery(id) turns one into { layout = name }, { look = name } or { close = true } for a component's onCallback to act on.
Engine limit: text under a CSS transform is culled by its unscaled box against the viewport and every clip around it. So thumbnails draw without clips inside the scale, and each one's unscaled box is anchored where it stays on screen. A card wider than the screen (full, sweep or minutes on a phone), or a grid that has to scroll (phone layout), loses the words whose unscaled position falls outside; the shapes and colours still draw.