diff --git a/.github/assets/rarity-ladder.png b/.github/assets/rarity-ladder.png index 8d4c5b0..cd367cb 100644 Binary files a/.github/assets/rarity-ladder.png and b/.github/assets/rarity-ladder.png differ diff --git a/.github/assets/types.png b/.github/assets/types.png index abbc55d..925ccc2 100644 Binary files a/.github/assets/types.png and b/.github/assets/types.png differ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a04cbba..0719d81 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -154,10 +154,15 @@ a line and make the site address a repository as if it were you. ## Art -Every frame, type icon and energy icon is original. **No assets from The Pokémon Company, no fan -icons** from the reference repositories — not even as a temporary placeholder. Frames, foil and -metals are generated by `npm run assets`; the 18 type icons are build inputs in +Frames, foils, metals and the coloured discs of the type icons are original. **No assets from The +Pokémon Company, no fan icons** from the reference repositories — not even as a temporary +placeholder. The one third-party art in the project is the glyph inside each type disc, which comes +from [Lucide](https://lucide.dev) under the ISC licence and is credited in the README. + +Frames, foil and metals are generated by `npm run assets`; the 18 type icons are build inputs in `scripts/assets/types/`, and the palette in `palette.json` is extracted from them, not the reverse. +That direction is the rule: a new icon set changes the frames with it, so replacing the icons means +re-extracting the palette and re-running `npm run assets`, never hand-editing a hex. ## Commits diff --git a/README.md b/README.md index 652be7b..a0f7d69 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ A static image URL, no login, embeddable in any README, that keeps itself up to The 18 energy types: normal, fire, water, grass, electric, ice, fighting, poison, ground, flying, psychic, bug, rock, ghost, dragon, dark, steel and fairy -Eighteen types, one per dominant language. Every icon here is original art — see the brief. +Eighteen types, one per dominant language. The discs are original art; the glyphs are Lucide (ISC) — see the brief.
@@ -225,8 +225,11 @@ the card, render it and say in the PR what you saw. ## Copyright -No assets from The Pokémon Company, no fan icons from the reference repositories. All frame, type -and energy art in this project is original. See `docs/assets-brief.md`. +No assets from The Pokémon Company, no fan icons from the reference repositories. The frames, the +foils, the metals and the coloured discs of the type icons are original. The glyph inside each disc +comes from [Lucide](https://lucide.dev), used under the ISC licence — Copyright (c) for portions of +Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT); all other copyright (c) for Lucide +are held by Lucide Contributors 2022. See `docs/assets-brief.md`. The tier names `Illustration Rare`, `Special Illustration Rare` and `Hyper Rare` are product terminology from The Pokémon Company, adopted here as TCG vocabulary. This is an open question — diff --git a/components/card/TypeIcon.tsx b/components/card/TypeIcon.tsx index 1f22902..5617530 100644 --- a/components/card/TypeIcon.tsx +++ b/components/card/TypeIcon.tsx @@ -18,7 +18,7 @@ export function TypeIcon({ size = 18, }: { element: Element; - /** Lado do disco em px. O SVG é quadrado (viewBox 256×256). */ + /** Lado do disco em px. O SVG é quadrado (viewBox 64×64). */ size?: number; }) { return ( @@ -29,7 +29,7 @@ export function TypeIcon({ aria-hidden="true" width={size} height={size} - // `loading="eager"`: são 18 arquivos de ~1KB e no máximo três aparecem por + // `loading="eager"`: são 18 arquivos de ~2KB e no máximo três aparecem por // página. Adiar carrega depois do primeiro quadro e o disco aparece // pulando, que é pior do que o custo de carregar junto. loading="eager" diff --git a/docs/assets-brief.md b/docs/assets-brief.md index 0e64f38..f7f6344 100644 --- a/docs/assets-brief.md +++ b/docs/assets-brief.md @@ -38,6 +38,25 @@ compor na carta e uma cópia do SVG em `public/assets/types/` para a interface w usar sem rasterizar. A paleta de `palette.json` foi extraída deles, e não o contrário. +### Revisão v2 + +A segunda leva trocou os 18 ícones. O disco continua original — cor chapada, +realce radial no alto à esquerda, sombra vertical e um aro branco a 22% —, mas o +**glifo deixou de ser desenhado à mão e passou a vir do [Lucide](https://lucide.dev)**, +sob licença ISC. É a única arte de terceiros no projeto, e o crédito está no +README junto do aviso de copyright. + +Duas consequências que valem registro: + +- Os SVGs vêm em `width`/`viewBox` de **64**, não de 256 como a v1. O PNG de + energia não herda mais esse número: `build-assets.mjs` fixa o lado em + `ENERGY_PX`, senão trocar a arte mudaria em silêncio a resolução do que o + Satori compõe. +- Os discos da v2 são bem mais saturados que os da v1 (`fire` foi de `#E4613E` + para `#FF3B14`). Como `palette.json` é extraída do disco, **as molduras + mudaram junto** — a regra de fonte única foi mantida, e é ela que fez a carta + inteira acompanhar a troca dos ícones. + ## Caminho escolhido — a decidir O RFC seção 8 deixou três caminhos abertos e **recomenda começar pelo C**: diff --git a/docs/design-system.md b/docs/design-system.md index e69389c..67e8e8a 100644 --- a/docs/design-system.md +++ b/docs/design-system.md @@ -33,7 +33,7 @@ Dark-only. Sem modo claro. São 18, não os 7 elementos da RFC 4.4 — ver o adendo naquela seção. -`normal #828282` · `fire #E4613E` · `water #3099E1` · `grass #439837` · `electric #DFBC28` · `ice #47C8C8` · `fighting #E49021` · `poison #9354CB` · `ground #A4733C` · `flying #74AAD0` · `psychic #E96C8C` · `bug #9F9F28` · `rock #A9A481` · `ghost #6F4570` · `dragon #576FBC` · `dark #4F4747` · `steel #74B0CB` · `fairy #E18CE1` +`normal #8FA0B3` · `fire #FF3B14` · `water #1E90FF` · `grass #14C445` · `electric #FFCC00` · `ice #17DCDC` · `fighting #FF6A00` · `poison #A733FF` · `ground #E08A2E` · `flying #35BFF5` · `psychic #FF2E7E` · `bug #B8E000` · `rock #D4A72C` · `ghost #8A45E8` · `dragon #2E5BFF` · `dark #4A3846` · `steel #4FB2E0` · `fairy #FF7ED4` Nenhuma dessas cores foi escolhida à mão: cada `base` foi **extraída do disco colorido do ícone** do tipo em `scripts/assets/types/`. É o que garante que o diff --git a/lib/cards/palette.json b/lib/cards/palette.json index 882e6c7..b46b887 100644 --- a/lib/cards/palette.json +++ b/lib/cards/palette.json @@ -1,22 +1,22 @@ { "_comment": "Cor de identidade de cada tipo. Fonte única — lida pelo gerador de arte (scripts/) e pelo runtime (lib/cards/elements.ts). O `base` de cada tipo foi EXTRAÍDO do disco colorido do respectivo ícone em scripts/assets/types/, não escolhido à mão: assim o ícone e a moldura nunca divergem. `dark`, `light` e `ink` são derivados do base por mistura fixa (45% preto, 78% branco, 80% preto).", - "normal": { "base": "#828282", "dark": "#484848", "light": "#E4E4E4", "ink": "#1A1A1A" }, - "fire": { "base": "#E4613E", "dark": "#7D3522", "light": "#F9DCD5", "ink": "#2E130C" }, - "water": { "base": "#3099E1", "dark": "#1A547C", "light": "#D1E9F8", "ink": "#0A1F2D" }, - "grass": { "base": "#439837", "dark": "#25541E", "light": "#D6E8D3", "ink": "#0D1E0B" }, - "electric": { "base": "#DFBC28", "dark": "#7B6716", "light": "#F8F0D0", "ink": "#2D2608" }, - "ice": { "base": "#47C8C8", "dark": "#276E6E", "light": "#D7F3F3", "ink": "#0E2828" }, - "fighting": { "base": "#E49021", "dark": "#7D4F12", "light": "#F9E7CE", "ink": "#2E1D07" }, - "poison": { "base": "#9354CB", "dark": "#512E70", "light": "#E7D9F4", "ink": "#1D1129" }, - "ground": { "base": "#A4733C", "dark": "#5A3F21", "light": "#EBE0D4", "ink": "#21170C" }, - "flying": { "base": "#74AAD0", "dark": "#405E72", "light": "#E0ECF5", "ink": "#17222A" }, - "psychic": { "base": "#E96C8C", "dark": "#803B4D", "light": "#FADFE6", "ink": "#2F161C" }, - "bug": { "base": "#9F9F28", "dark": "#575716", "light": "#EAEAD0", "ink": "#202008" }, - "rock": { "base": "#A9A481", "dark": "#5D5A47", "light": "#ECEBE3", "ink": "#22211A" }, - "ghost": { "base": "#6F4570", "dark": "#3D263E", "light": "#DFD6E0", "ink": "#160E16" }, - "dragon": { "base": "#576FBC", "dark": "#303D67", "light": "#DADFF0", "ink": "#111626" }, - "dark": { "base": "#4F4747", "dark": "#2B2727", "light": "#D8D7D7", "ink": "#100E0E" }, - "steel": { "base": "#74B0CB", "dark": "#406170", "light": "#E0EEF4", "ink": "#172329" }, - "fairy": { "base": "#E18CE1", "dark": "#7C4D7C", "light": "#F8E6F8", "ink": "#2D1C2D" } + "normal": { "base": "#8FA0B3", "dark": "#4F5862", "light": "#E6EAEE", "ink": "#1D2024" }, + "fire": { "base": "#FF3B14", "dark": "#8C200B", "light": "#FFD4CB", "ink": "#330C04" }, + "water": { "base": "#1E90FF", "dark": "#114F8C", "light": "#CEE7FF", "ink": "#061D33" }, + "grass": { "base": "#14C445", "dark": "#0B6C26", "light": "#CBF2D6", "ink": "#04270E" }, + "electric": { "base": "#FFCC00", "dark": "#8C7000", "light": "#FFF4C7", "ink": "#332900" }, + "ice": { "base": "#17DCDC", "dark": "#0D7979", "light": "#CCF7F7", "ink": "#052C2C" }, + "fighting": { "base": "#FF6A00", "dark": "#8C3A00", "light": "#FFDEC7", "ink": "#331500" }, + "poison": { "base": "#A733FF", "dark": "#5C1C8C", "light": "#ECD2FF", "ink": "#210A33" }, + "ground": { "base": "#E08A2E", "dark": "#7B4C19", "light": "#F8E5D1", "ink": "#2D1C09" }, + "flying": { "base": "#35BFF5", "dark": "#1D6987", "light": "#D3F1FD", "ink": "#0B2631" }, + "psychic": { "base": "#FF2E7E", "dark": "#8C1945", "light": "#FFD1E3", "ink": "#330919" }, + "bug": { "base": "#B8E000", "dark": "#657B00", "light": "#EFF8C7", "ink": "#252D00" }, + "rock": { "base": "#D4A72C", "dark": "#755C18", "light": "#F6ECD1", "ink": "#2A2109" }, + "ghost": { "base": "#8A45E8", "dark": "#4C2680", "light": "#E5D6FA", "ink": "#1C0E2E" }, + "dragon": { "base": "#2E5BFF", "dark": "#19328C", "light": "#D1DBFF", "ink": "#091233" }, + "dark": { "base": "#4A3846", "dark": "#291F27", "light": "#D7D3D6", "ink": "#0F0B0E" }, + "steel": { "base": "#4FB2E0", "dark": "#2B627B", "light": "#D8EEF8", "ink": "#10242D" }, + "fairy": { "base": "#FF7ED4", "dark": "#8C4575", "light": "#FFE3F6", "ink": "#33192A" } } diff --git a/public/assets/energy/bug.png b/public/assets/energy/bug.png index b51ae75..256245e 100644 Binary files a/public/assets/energy/bug.png and b/public/assets/energy/bug.png differ diff --git a/public/assets/energy/dark.png b/public/assets/energy/dark.png index 50a2004..f141643 100644 Binary files a/public/assets/energy/dark.png and b/public/assets/energy/dark.png differ diff --git a/public/assets/energy/dragon.png b/public/assets/energy/dragon.png index 843dd4a..d79ff72 100644 Binary files a/public/assets/energy/dragon.png and b/public/assets/energy/dragon.png differ diff --git a/public/assets/energy/electric.png b/public/assets/energy/electric.png index 2b47735..d6ea736 100644 Binary files a/public/assets/energy/electric.png and b/public/assets/energy/electric.png differ diff --git a/public/assets/energy/fairy.png b/public/assets/energy/fairy.png index 1a142c2..6c615ec 100644 Binary files a/public/assets/energy/fairy.png and b/public/assets/energy/fairy.png differ diff --git a/public/assets/energy/fighting.png b/public/assets/energy/fighting.png index abd0712..c4b7028 100644 Binary files a/public/assets/energy/fighting.png and b/public/assets/energy/fighting.png differ diff --git a/public/assets/energy/fire.png b/public/assets/energy/fire.png index 62a188b..cf82c84 100644 Binary files a/public/assets/energy/fire.png and b/public/assets/energy/fire.png differ diff --git a/public/assets/energy/flying.png b/public/assets/energy/flying.png index f882696..2d794a5 100644 Binary files a/public/assets/energy/flying.png and b/public/assets/energy/flying.png differ diff --git a/public/assets/energy/ghost.png b/public/assets/energy/ghost.png index 17f5e1f..25eff03 100644 Binary files a/public/assets/energy/ghost.png and b/public/assets/energy/ghost.png differ diff --git a/public/assets/energy/grass.png b/public/assets/energy/grass.png index cc4b803..9d8b555 100644 Binary files a/public/assets/energy/grass.png and b/public/assets/energy/grass.png differ diff --git a/public/assets/energy/ground.png b/public/assets/energy/ground.png index 09ef48e..dd7c264 100644 Binary files a/public/assets/energy/ground.png and b/public/assets/energy/ground.png differ diff --git a/public/assets/energy/ice.png b/public/assets/energy/ice.png index fa0b91b..fd3466d 100644 Binary files a/public/assets/energy/ice.png and b/public/assets/energy/ice.png differ diff --git a/public/assets/energy/normal.png b/public/assets/energy/normal.png index caa567c..a941f01 100644 Binary files a/public/assets/energy/normal.png and b/public/assets/energy/normal.png differ diff --git a/public/assets/energy/poison.png b/public/assets/energy/poison.png index def71e4..07b0c37 100644 Binary files a/public/assets/energy/poison.png and b/public/assets/energy/poison.png differ diff --git a/public/assets/energy/psychic.png b/public/assets/energy/psychic.png index b25ad7d..37c3cc7 100644 Binary files a/public/assets/energy/psychic.png and b/public/assets/energy/psychic.png differ diff --git a/public/assets/energy/rock.png b/public/assets/energy/rock.png index fcb1285..3ca78db 100644 Binary files a/public/assets/energy/rock.png and b/public/assets/energy/rock.png differ diff --git a/public/assets/energy/steel.png b/public/assets/energy/steel.png index afcf499..b795212 100644 Binary files a/public/assets/energy/steel.png and b/public/assets/energy/steel.png differ diff --git a/public/assets/energy/water.png b/public/assets/energy/water.png index 655fdf2..1c88eb8 100644 Binary files a/public/assets/energy/water.png and b/public/assets/energy/water.png differ diff --git a/public/assets/frames/bug.png b/public/assets/frames/bug.png index 5afa2f6..677c199 100644 Binary files a/public/assets/frames/bug.png and b/public/assets/frames/bug.png differ diff --git a/public/assets/frames/dark.png b/public/assets/frames/dark.png index a668358..b5e34ae 100644 Binary files a/public/assets/frames/dark.png and b/public/assets/frames/dark.png differ diff --git a/public/assets/frames/dragon.png b/public/assets/frames/dragon.png index efe2237..3ccaf4b 100644 Binary files a/public/assets/frames/dragon.png and b/public/assets/frames/dragon.png differ diff --git a/public/assets/frames/electric.png b/public/assets/frames/electric.png index 95ca862..f98fa0a 100644 Binary files a/public/assets/frames/electric.png and b/public/assets/frames/electric.png differ diff --git a/public/assets/frames/fairy.png b/public/assets/frames/fairy.png index 8003809..be1bba8 100644 Binary files a/public/assets/frames/fairy.png and b/public/assets/frames/fairy.png differ diff --git a/public/assets/frames/fighting.png b/public/assets/frames/fighting.png index a7f8c00..dc8a370 100644 Binary files a/public/assets/frames/fighting.png and b/public/assets/frames/fighting.png differ diff --git a/public/assets/frames/fire.png b/public/assets/frames/fire.png index ed567a7..f0ddbcd 100644 Binary files a/public/assets/frames/fire.png and b/public/assets/frames/fire.png differ diff --git a/public/assets/frames/flying.png b/public/assets/frames/flying.png index d4a6dc1..67c934c 100644 Binary files a/public/assets/frames/flying.png and b/public/assets/frames/flying.png differ diff --git a/public/assets/frames/fullart-bug.png b/public/assets/frames/fullart-bug.png index b7132fa..202bf25 100644 Binary files a/public/assets/frames/fullart-bug.png and b/public/assets/frames/fullart-bug.png differ diff --git a/public/assets/frames/fullart-dark.png b/public/assets/frames/fullart-dark.png index 1db1f1e..37b98d5 100644 Binary files a/public/assets/frames/fullart-dark.png and b/public/assets/frames/fullart-dark.png differ diff --git a/public/assets/frames/fullart-dragon.png b/public/assets/frames/fullart-dragon.png index 9463237..c93b09e 100644 Binary files a/public/assets/frames/fullart-dragon.png and b/public/assets/frames/fullart-dragon.png differ diff --git a/public/assets/frames/fullart-electric.png b/public/assets/frames/fullart-electric.png index ca6e17d..a707a59 100644 Binary files a/public/assets/frames/fullart-electric.png and b/public/assets/frames/fullart-electric.png differ diff --git a/public/assets/frames/fullart-fairy.png b/public/assets/frames/fullart-fairy.png index 642916c..fca0d30 100644 Binary files a/public/assets/frames/fullart-fairy.png and b/public/assets/frames/fullart-fairy.png differ diff --git a/public/assets/frames/fullart-fighting.png b/public/assets/frames/fullart-fighting.png index 3b76020..b947196 100644 Binary files a/public/assets/frames/fullart-fighting.png and b/public/assets/frames/fullart-fighting.png differ diff --git a/public/assets/frames/fullart-fire.png b/public/assets/frames/fullart-fire.png index 4123314..0be31df 100644 Binary files a/public/assets/frames/fullart-fire.png and b/public/assets/frames/fullart-fire.png differ diff --git a/public/assets/frames/fullart-flying.png b/public/assets/frames/fullart-flying.png index e7cd96c..09eee8b 100644 Binary files a/public/assets/frames/fullart-flying.png and b/public/assets/frames/fullart-flying.png differ diff --git a/public/assets/frames/fullart-ghost.png b/public/assets/frames/fullart-ghost.png index 37743d0..cdaea2f 100644 Binary files a/public/assets/frames/fullart-ghost.png and b/public/assets/frames/fullart-ghost.png differ diff --git a/public/assets/frames/fullart-grass.png b/public/assets/frames/fullart-grass.png index bd1093e..cab81ae 100644 Binary files a/public/assets/frames/fullart-grass.png and b/public/assets/frames/fullart-grass.png differ diff --git a/public/assets/frames/fullart-ground.png b/public/assets/frames/fullart-ground.png index 635aba2..2cd1690 100644 Binary files a/public/assets/frames/fullart-ground.png and b/public/assets/frames/fullart-ground.png differ diff --git a/public/assets/frames/fullart-ice.png b/public/assets/frames/fullart-ice.png index eaab330..d7bd1ee 100644 Binary files a/public/assets/frames/fullart-ice.png and b/public/assets/frames/fullart-ice.png differ diff --git a/public/assets/frames/fullart-normal.png b/public/assets/frames/fullart-normal.png index 82442b7..fd53dd0 100644 Binary files a/public/assets/frames/fullart-normal.png and b/public/assets/frames/fullart-normal.png differ diff --git a/public/assets/frames/fullart-poison.png b/public/assets/frames/fullart-poison.png index f1a6969..0713f99 100644 Binary files a/public/assets/frames/fullart-poison.png and b/public/assets/frames/fullart-poison.png differ diff --git a/public/assets/frames/fullart-psychic.png b/public/assets/frames/fullart-psychic.png index ed6f3bd..d56ab5e 100644 Binary files a/public/assets/frames/fullart-psychic.png and b/public/assets/frames/fullart-psychic.png differ diff --git a/public/assets/frames/fullart-rock.png b/public/assets/frames/fullart-rock.png index 56c6c4d..0aa49c9 100644 Binary files a/public/assets/frames/fullart-rock.png and b/public/assets/frames/fullart-rock.png differ diff --git a/public/assets/frames/fullart-steel.png b/public/assets/frames/fullart-steel.png index f3bf150..0c19b50 100644 Binary files a/public/assets/frames/fullart-steel.png and b/public/assets/frames/fullart-steel.png differ diff --git a/public/assets/frames/fullart-water.png b/public/assets/frames/fullart-water.png index 00769c3..af0094c 100644 Binary files a/public/assets/frames/fullart-water.png and b/public/assets/frames/fullart-water.png differ diff --git a/public/assets/frames/ghost.png b/public/assets/frames/ghost.png index fcc17a9..f2305a9 100644 Binary files a/public/assets/frames/ghost.png and b/public/assets/frames/ghost.png differ diff --git a/public/assets/frames/grass.png b/public/assets/frames/grass.png index 4b494ee..c77c3c4 100644 Binary files a/public/assets/frames/grass.png and b/public/assets/frames/grass.png differ diff --git a/public/assets/frames/ground.png b/public/assets/frames/ground.png index abf9d17..5579dfc 100644 Binary files a/public/assets/frames/ground.png and b/public/assets/frames/ground.png differ diff --git a/public/assets/frames/ice.png b/public/assets/frames/ice.png index e13116c..ad453f4 100644 Binary files a/public/assets/frames/ice.png and b/public/assets/frames/ice.png differ diff --git a/public/assets/frames/normal.png b/public/assets/frames/normal.png index cb2d8ec..0fe9803 100644 Binary files a/public/assets/frames/normal.png and b/public/assets/frames/normal.png differ diff --git a/public/assets/frames/poison.png b/public/assets/frames/poison.png index 777e4a2..adab86a 100644 Binary files a/public/assets/frames/poison.png and b/public/assets/frames/poison.png differ diff --git a/public/assets/frames/psychic.png b/public/assets/frames/psychic.png index 75af0cc..70ccbc1 100644 Binary files a/public/assets/frames/psychic.png and b/public/assets/frames/psychic.png differ diff --git a/public/assets/frames/rock.png b/public/assets/frames/rock.png index e569b6d..c02ca09 100644 Binary files a/public/assets/frames/rock.png and b/public/assets/frames/rock.png differ diff --git a/public/assets/frames/steel.png b/public/assets/frames/steel.png index 9c2c9c9..28801fc 100644 Binary files a/public/assets/frames/steel.png and b/public/assets/frames/steel.png differ diff --git a/public/assets/frames/water.png b/public/assets/frames/water.png index 5342367..9a0f591 100644 Binary files a/public/assets/frames/water.png and b/public/assets/frames/water.png differ diff --git a/public/assets/types/bug.svg b/public/assets/types/bug.svg index 26bc80b..9dc8547 100644 --- a/public/assets/types/bug.svg +++ b/public/assets/types/bug.svg @@ -1,20 +1,20 @@ - - + - + + + + + + + + + + - - - - - - + + + + + + \ No newline at end of file diff --git a/public/assets/types/dark.svg b/public/assets/types/dark.svg index 3bb988c..c6b24a8 100644 --- a/public/assets/types/dark.svg +++ b/public/assets/types/dark.svg @@ -1,17 +1,20 @@ - - + - + + + + + + + + + + - - - + + + + + + \ No newline at end of file diff --git a/public/assets/types/dragon.svg b/public/assets/types/dragon.svg index e079a93..7520fb9 100644 --- a/public/assets/types/dragon.svg +++ b/public/assets/types/dragon.svg @@ -1,20 +1,20 @@ - - + - + + + + + + + + + + - - - - - - + + + + + + \ No newline at end of file diff --git a/public/assets/types/electric.svg b/public/assets/types/electric.svg index a250881..911a5f0 100644 --- a/public/assets/types/electric.svg +++ b/public/assets/types/electric.svg @@ -1,16 +1,20 @@ - - + - + + + + + + + + + + - - + + + + + + \ No newline at end of file diff --git a/public/assets/types/fairy.svg b/public/assets/types/fairy.svg index 1a87a20..d542301 100644 --- a/public/assets/types/fairy.svg +++ b/public/assets/types/fairy.svg @@ -1,21 +1,20 @@ - - + - + + + + + + + + + + - - - + + + + + + \ No newline at end of file diff --git a/public/assets/types/fighting.svg b/public/assets/types/fighting.svg index ae1d5e3..fe6c9f4 100644 --- a/public/assets/types/fighting.svg +++ b/public/assets/types/fighting.svg @@ -1,21 +1,20 @@ - - + - + + + + + + + + + + - - - - - - - + + + + + + \ No newline at end of file diff --git a/public/assets/types/fire.svg b/public/assets/types/fire.svg index a2883a2..6ad44e7 100644 --- a/public/assets/types/fire.svg +++ b/public/assets/types/fire.svg @@ -1,16 +1,20 @@ - - + - + + + + + + + + + + - - + + + + + + \ No newline at end of file diff --git a/public/assets/types/flying.svg b/public/assets/types/flying.svg index 23bbd98..fbc55f7 100644 --- a/public/assets/types/flying.svg +++ b/public/assets/types/flying.svg @@ -1,16 +1,20 @@ - - + - + + + + + + + + + + - - + + + + + + \ No newline at end of file diff --git a/public/assets/types/ghost.svg b/public/assets/types/ghost.svg index 27d16dc..e865d2c 100644 --- a/public/assets/types/ghost.svg +++ b/public/assets/types/ghost.svg @@ -1,22 +1,20 @@ - - + - + + + + + + + + + + - - - - + + + + + + \ No newline at end of file diff --git a/public/assets/types/grass.svg b/public/assets/types/grass.svg index e597f98..9331661 100644 --- a/public/assets/types/grass.svg +++ b/public/assets/types/grass.svg @@ -1,18 +1,20 @@ - - + - + + + + + + + + + + - - - - + + + + + + \ No newline at end of file diff --git a/public/assets/types/ground.svg b/public/assets/types/ground.svg index 76ceaf6..5ea5d0e 100644 --- a/public/assets/types/ground.svg +++ b/public/assets/types/ground.svg @@ -1,20 +1,20 @@ - - + - + + + + + + + + + + - - - - - - + + + + + + \ No newline at end of file diff --git a/public/assets/types/ice.svg b/public/assets/types/ice.svg index 8aefcd9..f16c5e8 100644 --- a/public/assets/types/ice.svg +++ b/public/assets/types/ice.svg @@ -1,21 +1,20 @@ - - + - + + + + + + + + + + - - - + + + + + + \ No newline at end of file diff --git a/public/assets/types/normal.svg b/public/assets/types/normal.svg index 416ac98..16b2509 100644 --- a/public/assets/types/normal.svg +++ b/public/assets/types/normal.svg @@ -1,17 +1,20 @@ - - + - + + + + + + + + + + - - - + + + + + + \ No newline at end of file diff --git a/public/assets/types/poison.svg b/public/assets/types/poison.svg index f5d5cde..d386565 100644 --- a/public/assets/types/poison.svg +++ b/public/assets/types/poison.svg @@ -1,18 +1,20 @@ - - + - + + + + + + + + + + - - - - + + + + + + \ No newline at end of file diff --git a/public/assets/types/psychic.svg b/public/assets/types/psychic.svg index b5ab080..2bddcb6 100644 --- a/public/assets/types/psychic.svg +++ b/public/assets/types/psychic.svg @@ -1,21 +1,20 @@ - - + - + + + + + + + + + + - - - + + + + + + \ No newline at end of file diff --git a/public/assets/types/rock.svg b/public/assets/types/rock.svg index 46cbfe3..bdba591 100644 --- a/public/assets/types/rock.svg +++ b/public/assets/types/rock.svg @@ -1,16 +1,20 @@ - - + - + + + + + + + + + + - - + + + + + + \ No newline at end of file diff --git a/public/assets/types/steel.svg b/public/assets/types/steel.svg index 8097904..7930ce4 100644 --- a/public/assets/types/steel.svg +++ b/public/assets/types/steel.svg @@ -1,24 +1,20 @@ - - + - + + + + + + + + + + - - - - - - + + + + + + \ No newline at end of file diff --git a/public/assets/types/water.svg b/public/assets/types/water.svg index 60c2263..4a57080 100644 --- a/public/assets/types/water.svg +++ b/public/assets/types/water.svg @@ -1,21 +1,20 @@ - - + - + + + + + + + + + + - - - + + + + + + \ No newline at end of file diff --git a/scripts/assets/types/bug.svg b/scripts/assets/types/bug.svg index 26bc80b..9dc8547 100644 --- a/scripts/assets/types/bug.svg +++ b/scripts/assets/types/bug.svg @@ -1,20 +1,20 @@ - - + - + + + + + + + + + + - - - - - - + + + + + + \ No newline at end of file diff --git a/scripts/assets/types/dark.svg b/scripts/assets/types/dark.svg index 3bb988c..c6b24a8 100644 --- a/scripts/assets/types/dark.svg +++ b/scripts/assets/types/dark.svg @@ -1,17 +1,20 @@ - - + - + + + + + + + + + + - - - + + + + + + \ No newline at end of file diff --git a/scripts/assets/types/dragon.svg b/scripts/assets/types/dragon.svg index e079a93..7520fb9 100644 --- a/scripts/assets/types/dragon.svg +++ b/scripts/assets/types/dragon.svg @@ -1,20 +1,20 @@ - - + - + + + + + + + + + + - - - - - - + + + + + + \ No newline at end of file diff --git a/scripts/assets/types/electric.svg b/scripts/assets/types/electric.svg index a250881..911a5f0 100644 --- a/scripts/assets/types/electric.svg +++ b/scripts/assets/types/electric.svg @@ -1,16 +1,20 @@ - - + - + + + + + + + + + + - - + + + + + + \ No newline at end of file diff --git a/scripts/assets/types/fairy.svg b/scripts/assets/types/fairy.svg index 1a87a20..d542301 100644 --- a/scripts/assets/types/fairy.svg +++ b/scripts/assets/types/fairy.svg @@ -1,21 +1,20 @@ - - + - + + + + + + + + + + - - - + + + + + + \ No newline at end of file diff --git a/scripts/assets/types/fighting.svg b/scripts/assets/types/fighting.svg index ae1d5e3..fe6c9f4 100644 --- a/scripts/assets/types/fighting.svg +++ b/scripts/assets/types/fighting.svg @@ -1,21 +1,20 @@ - - + - + + + + + + + + + + - - - - - - - + + + + + + \ No newline at end of file diff --git a/scripts/assets/types/fire.svg b/scripts/assets/types/fire.svg index a2883a2..6ad44e7 100644 --- a/scripts/assets/types/fire.svg +++ b/scripts/assets/types/fire.svg @@ -1,16 +1,20 @@ - - + - + + + + + + + + + + - - + + + + + + \ No newline at end of file diff --git a/scripts/assets/types/flying.svg b/scripts/assets/types/flying.svg index 23bbd98..fbc55f7 100644 --- a/scripts/assets/types/flying.svg +++ b/scripts/assets/types/flying.svg @@ -1,16 +1,20 @@ - - + - + + + + + + + + + + - - + + + + + + \ No newline at end of file diff --git a/scripts/assets/types/ghost.svg b/scripts/assets/types/ghost.svg index 27d16dc..e865d2c 100644 --- a/scripts/assets/types/ghost.svg +++ b/scripts/assets/types/ghost.svg @@ -1,22 +1,20 @@ - - + - + + + + + + + + + + - - - - + + + + + + \ No newline at end of file diff --git a/scripts/assets/types/grass.svg b/scripts/assets/types/grass.svg index e597f98..9331661 100644 --- a/scripts/assets/types/grass.svg +++ b/scripts/assets/types/grass.svg @@ -1,18 +1,20 @@ - - + - + + + + + + + + + + - - - - + + + + + + \ No newline at end of file diff --git a/scripts/assets/types/ground.svg b/scripts/assets/types/ground.svg index 76ceaf6..5ea5d0e 100644 --- a/scripts/assets/types/ground.svg +++ b/scripts/assets/types/ground.svg @@ -1,20 +1,20 @@ - - + - + + + + + + + + + + - - - - - - + + + + + + \ No newline at end of file diff --git a/scripts/assets/types/ice.svg b/scripts/assets/types/ice.svg index 8aefcd9..f16c5e8 100644 --- a/scripts/assets/types/ice.svg +++ b/scripts/assets/types/ice.svg @@ -1,21 +1,20 @@ - - + - + + + + + + + + + + - - - + + + + + + \ No newline at end of file diff --git a/scripts/assets/types/normal.svg b/scripts/assets/types/normal.svg index 416ac98..16b2509 100644 --- a/scripts/assets/types/normal.svg +++ b/scripts/assets/types/normal.svg @@ -1,17 +1,20 @@ - - + - + + + + + + + + + + - - - + + + + + + \ No newline at end of file diff --git a/scripts/assets/types/poison.svg b/scripts/assets/types/poison.svg index f5d5cde..d386565 100644 --- a/scripts/assets/types/poison.svg +++ b/scripts/assets/types/poison.svg @@ -1,18 +1,20 @@ - - + - + + + + + + + + + + - - - - + + + + + + \ No newline at end of file diff --git a/scripts/assets/types/psychic.svg b/scripts/assets/types/psychic.svg index b5ab080..2bddcb6 100644 --- a/scripts/assets/types/psychic.svg +++ b/scripts/assets/types/psychic.svg @@ -1,21 +1,20 @@ - - + - + + + + + + + + + + - - - + + + + + + \ No newline at end of file diff --git a/scripts/assets/types/rock.svg b/scripts/assets/types/rock.svg index 46cbfe3..bdba591 100644 --- a/scripts/assets/types/rock.svg +++ b/scripts/assets/types/rock.svg @@ -1,16 +1,20 @@ - - + - + + + + + + + + + + - - + + + + + + \ No newline at end of file diff --git a/scripts/assets/types/steel.svg b/scripts/assets/types/steel.svg index 8097904..7930ce4 100644 --- a/scripts/assets/types/steel.svg +++ b/scripts/assets/types/steel.svg @@ -1,24 +1,20 @@ - - + - + + + + + + + + + + - - - - - - + + + + + + \ No newline at end of file diff --git a/scripts/assets/types/water.svg b/scripts/assets/types/water.svg index 60c2263..4a57080 100644 --- a/scripts/assets/types/water.svg +++ b/scripts/assets/types/water.svg @@ -1,21 +1,20 @@ - - + - + + + + + + + + + + - - - + + + + + + \ No newline at end of file diff --git a/scripts/build-assets.mjs b/scripts/build-assets.mjs index c8fb53e..bd8614d 100644 --- a/scripts/build-assets.mjs +++ b/scripts/build-assets.mjs @@ -36,10 +36,15 @@ const elements = Object.keys(palette).filter((key) => !key.startsWith("_")); * custa nada. Nas molduras seria o contrário: são gradientes largos e suaves, * exatamente onde 256 cores viram faixas. */ -async function emit(relativePath, svg, { palette = false } = {}) { +async function emit(relativePath, svg, { palette = false, width } = {}) { const target = join(root, "public/assets", relativePath); await mkdir(dirname(target), { recursive: true }); - const { size } = await sharp(Buffer.from(svg)) + const pipeline = sharp(Buffer.from(svg)); + // `resize` sobre um SVG não amplia bitmap: o sharp rasteriza de novo no tamanho + // pedido. É por isso que o lado do ícone de energia pode ser fixado na chamada + // em vez de depender do `width` que o desenhista escreveu no arquivo. + if (width) pipeline.resize(width, width); + const { size } = await pipeline .png({ compressionLevel: 9, palette, effort: palette ? 10 : undefined }) .toFile(target); console.log(` ${relativePath.padEnd(44)} ${(size / 1024).toFixed(1)} KB`); @@ -100,12 +105,19 @@ for (const [tier, bands] of Object.entries(foil.bands)) { * * Cada um vira duas coisas: um PNG para o Satori compor na carta, e uma cópia do * SVG em `public/assets/types/` para a interface web usar direto, sem rasterizar. + * + * O lado do PNG é fixado aqui, não herdado do SVG. O desenho é vetor e cada + * revisão dos ícones pode chegar com outro `width` no arquivo — a v2 veio em 64, + * a v1 vinha em 256. Sem o número fixo, trocar a arte mudaria em silêncio a + * resolução do que o Satori compõe na carta. */ -console.log("\nenergia (a partir dos ícones de tipo)"); +const ENERGY_PX = 256; + +console.log(`\nenergia (a partir dos ícones de tipo, ${ENERGY_PX}px)`); const typesDir = join(root, "scripts/assets/types"); for (const element of elements) { const svg = await readFile(join(typesDir, `${element}.svg`), "utf8"); - await emit(`energy/${element}.png`, svg); + await emit(`energy/${element}.png`, svg, { width: ENERGY_PX }); const webTarget = join(root, "public/assets/types", `${element}.svg`); await mkdir(dirname(webTarget), { recursive: true });