perf(sprites): serve grid-sized thumbnails from an immutable URL space

Every grid cell downloaded the full detail sprite. Generate a smaller
/sprites-grid/v1/ set at build time and let the grid ask for those first,
falling back through the existing detail URLs when a thumbnail is missing so
detail resolution is unchanged. The new prefix is versioned, so it can be cached
forever, and the service worker recognises it alongside the other sprite roots.

The placeholder is now an empty box rather than a spinner: a thousand spinners
cost layout work and announced nothing useful.
This commit is contained in:
Josh Creek
2026-09-15 17:46:49 +01:00
parent 26b9e3b8c1
commit b2b750115f
10 changed files with 128 additions and 20 deletions
+3
View File
@@ -13,3 +13,6 @@ static/sprites-small/manifest.json
# Machine-local editor and tool settings.
**/*.local.json
# Generated grid artwork.
static/sprites-grid/