mirror of
https://github.com/Pandipipas/scoreko-dev.git
synced 2026-06-06 11:42:06 +00:00
Remove tracked PNG game logos from repository
This commit is contained in:
@@ -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),
|
||||
};
|
||||
}),
|
||||
]),
|
||||
|
||||
@@ -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]));
|
||||
Reference in New Issue
Block a user