perf(assets): ship key art as webp and drop unreferenced media

Fifty-seven percent of the built output was reachable by nothing but a
manifest that is never fetched at runtime. The key art documented as the
menu background was never wired up; a 1.2KB placeholder was loaded instead.

- wire key art into the menu, ending screen and act four to six intros
- re-encode key art to webp: 1.63MB to 556KB at DSSIM around 0.012
- move 3.9MB of unwired voice lines and authoring sources out of the
  bundle into unshipped-assets, still tracked rather than deleted
- add 192 and 512 icons, the sizes an install prompt requires
This commit is contained in:
tiennm99 committed 2026-07-26 00:35:36 +07:00
1 parent f883c91b1e
commit 2c8b0dc89b
57 files changed
+24

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

+24
View File
@@ -55,7 +55,31 @@ export const GENERATED_SCENES = [
`${BASE}scene-chamber.png`,
];
// Hand-authored 1280x720 key art, stored as webp (the source pngs were ~3x the
// size at no visible gain on a backdrop rendered under a gradient).
const KEYART_BASE = 'assets/images/';
export const KEYART = {
garden: `${KEYART_BASE}keyart-garden.webp`,
gameover: `${KEYART_BASE}keyart-gameover.webp`,
underground: `${KEYART_BASE}keyart-underground.webp`,
palace: `${KEYART_BASE}keyart-palace.webp`,
throne: `${KEYART_BASE}keyart-throne.webp`,
};
// Level-intro backdrops. Acts 4-6 use the detailed key art; earlier acts use the
// generated scene tiles, which suit the simpler outdoor levels.
const KEYART_BY_LEVEL = {
7: KEYART.underground,
8: KEYART.underground,
9: KEYART.palace,
10: KEYART.palace,
11: KEYART.palace,
12: KEYART.throne,
};
export function generatedSceneForLevel(level) {
if (KEYART_BY_LEVEL[level]) return KEYART_BY_LEVEL[level];
const idx = Math.max(0, Math.min(GENERATED_SCENES.length - 1, level - 1));
return GENERATED_SCENES[idx];
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.