Remove tracked PNG game logos from repository

This commit is contained in:
Pandipipas
2026-03-03 15:44:47 +01:00
parent 1735e38edd
commit 057b5a29c3
10 changed files with 853 additions and 25 deletions
+13 -3
View File
@@ -2,6 +2,8 @@ export interface FightingCharacterOption {
label: string;
value: string;
image: string;
bundledImage: string;
fallbackImage: string;
}
type GamePalette = readonly [startColor: string, endColor: string];
@@ -294,6 +296,11 @@ const buildCharacterPlaceholder = (game: string, character: string) => {
return toDataUrl(svg.trim());
};
const getCharacterAssetUrl = (game: string, characterValue: string) => {
const gameSlug = toSlug(game);
return `/bundles/scoreko-dev/game-assets/${gameSlug}/characters/${characterValue}.png`;
};
const characterImageModules = import.meta.glob('/src/shared/character-images/**/*.{png,jpg,jpeg,webp,avif,svg}', {
eager: true,
import: 'default',
@@ -323,12 +330,13 @@ const characterImageByKey = Object.entries(characterImageModules).reduce<Record<
return acc;
}, {});
const getCharacterImage = (game: string, character: string, characterValue: string) => {
const getBundledCharacterImage = (game: string, characterValue: string) => {
const gameSlug = toSlug(game);
const key = `${gameSlug}/${characterValue}`;
return characterImageByKey[key] ?? buildCharacterPlaceholder(game, character);
return characterImageByKey[`${gameSlug}/${characterValue}`] ?? '';
};
const getCharacterImage = (game: string, character: string, characterValue: string) => getCharacterAssetUrl(game, characterValue);
export const fightingCharactersByGame: Record<string, FightingCharacterOption[]> = Object.fromEntries(
Object.entries(characterNamesByGame).map(([game, characterNames]) => [
game,
@@ -339,6 +347,8 @@ export const fightingCharactersByGame: Record<string, FightingCharacterOption[]>
label: character,
value,
image: getCharacterImage(game, character, value),
bundledImage: getBundledCharacterImage(game, value),
fallbackImage: buildCharacterPlaceholder(game, character),
};
}),
]),
+68
View File
@@ -0,0 +1,68 @@
export interface FightingGameCatalogEntry {
title: string;
slug: string;
logoFile: string;
trailerUrl: string;
description: string;
approxSize: string;
repoFolder: string;
}
export const fightingGamesCatalog: FightingGameCatalogEntry[] = [
{
title: 'Street Fighter 6',
slug: 'street-fighter-6',
logoFile: 'street-fighter-6.png',
trailerUrl: 'https://www.youtube.com/watch?v=HfJ5UvzS0x0',
description: 'Combates rápidos con Drive System, roster moderno y estilo arcade competitivo.',
approxSize: '~45 MB',
repoFolder: 'street-fighter-6',
},
{
title: 'TEKKEN 8',
slug: 'tekken-8',
logoFile: 'tekken-8.png',
trailerUrl: 'https://www.youtube.com/watch?v=07FdDRbdurg',
description: '3D fighter con sistema Heat y enfoque agresivo para partidas espectaculares.',
approxSize: '~58 MB',
repoFolder: 'tekken-8',
},
{
title: '2XKO',
slug: '2xko',
logoFile: '2xko.png',
trailerUrl: 'https://www.youtube.com/watch?v=5hugGCZon3I',
description: 'Tag fighter 2v2 de Riot con assists y mecánicas de equipo.',
approxSize: '~26 MB',
repoFolder: '2xko',
},
{
title: 'Guilty Gear -Strive-',
slug: 'guilty-gear-strive',
logoFile: 'guilty-gear-strive.png',
trailerUrl: 'https://www.youtube.com/watch?v=8X5cQMdqZEA',
description: 'Anime fighter de Arc System Works con alto impacto visual y neutral explosivo.',
approxSize: '~33 MB',
repoFolder: 'guilty-gear-strive',
},
{
title: 'Mortal Kombat 1',
slug: 'mortal-kombat-1',
logoFile: 'mortal-kombat-1.png',
trailerUrl: 'https://www.youtube.com/watch?v=UZ6eFEjFfJ0',
description: 'Reinicio de la saga con Kameos, cast clásico y estética cinematográfica.',
approxSize: '~40 MB',
repoFolder: 'mortal-kombat-1',
},
{
title: 'THE KING OF FIGHTERS XV',
slug: 'the-king-of-fighters-xv',
logoFile: 'the-king-of-fighters-xv.png',
trailerUrl: 'https://www.youtube.com/watch?v=q3lX2p_Uy9I',
description: 'Combates 3v3 clásicos de SNK, ritmo rápido y amplio plantel.',
approxSize: '~36 MB',
repoFolder: 'the-king-of-fighters-xv',
},
];
export const fightingGameByTitle = Object.fromEntries(fightingGamesCatalog.map((entry) => [entry.title, entry]));