Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

pixel-perfect

/pixel-perfect

Pilnuje, by gry i strony z pixel artem renderowały się ostro: jedna rozdzielczość, skalowanie całkowite i filtr nearest.

Licencja
MIT
Ostatnia zmiana repozytorium
05.11.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
4
Skrypty
1
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 05.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: reference/audit.js

Co robi i kiedy

Pilnuje, by gry i strony z pixel artem renderowały się ostro: jedna rozdzielczość, skalowanie całkowite i filtr nearest.

Wyzwalacze z opisu

off
Oryginalny opis (EN)

Make pixel-art games and pages render crisply: one base resolution, whole-number scaling, nearest filtering, everything on one pixel grid. Use when building or fixing anything with pixel art (canvas, Phaser, PixiJS, Godot, Unity), or when pixel art looks blurry, lumpy, shimmery or "off".

Jak działa

  1. The rules
  2. How to apply
Sekcje z nagłówków SKILL.md, w oryginale · 35 linii, 374 słów
Podgląd SKILL.md
---
name: pixel-perfect
description: Make pixel-art games and pages render crisply: one base resolution, whole-number scaling, nearest filtering, everything on one pixel grid. Use when building or fixing anything with pixel art (canvas, Phaser, PixiJS, Godot, Unity), or when pixel art looks blurry, lumpy, shimmery or "off".
---

# Pixel perfect

Pixel art made by a model usually looks wrong for rendering reasons, not art reasons. The sprites are fine; the
pipeline smears, stretches or mixes them. Apply these rules before touching the art.

## The rules

1. **One base resolution.** Pick it up front (320×180, 384×216, 480×270, 640×360) and draw the whole game into it,
   UI included. 320×180 ×6 is exactly 1920×1080; 384×216 ×5 is exactly 1920×1080.
2. **Whole-number scale only.** Scale the base frame by the largest integer that fits the window. Fill what's left
   with bars (black or a matching colour). Never stretch to fill.
3. **Nearest filtering everywhere.** Canvas: `imageSmoothingEnabled = false` on every context, `image-rendering:
   pixelated` on the element. Textures: nearest/point filter, no mipmaps, no lossy compression.
4. **Snap to whole pixels.** Camera position and every sprite position are rounded to integers in base pixels before
   drawing. Keep the physics in floats; round only at draw time.
5. **One pixel size for everything.** No sprite, tile, particle or UI element drawn at any scale but 1 inside the base
   frame. A 2x sprite next to 1x tiles reads as "pasted on".
6. **No runtime rotation.** Draw rotation frames (or use 90° steps and flips). A rotated sprite under nearest filtering
   tears; under linear it blurs.
7. **Pixel fonts at native size, no antialiasing.** Use a bitmap or pixel font drawn into the base frame, at its
   designed size.
8. **Effects on the grid.** Particles are 1×1 (or whole-pixel) rects at rounded positions inside the base frame, not
   antialiased circles on the screen canvas.
9. **Check every new asset at 1x** next to a tile before it goes in. Pixel sizes must match.

## How to apply

- Before writing rendering code, state the base resolution and the scale rule you'll use.
- Draw the game into an offscreen base canvas; blit it to the screen once per frame with an integer scale.
- After building, run `reference/audit.js` in the page (it reads the canvas setup and flags the mistakes above),
  then zoom a screenshot to 400% and look at the edges of a sprite against the grid.
- Engine settings for Phaser, PixiJS, Godot and Unity are in `reference/engines.md`.
- Symptoms and their fixes are in `reference/checklist.md`.
Pliki w paczce (4)
  • SKILL.md 3 KB
  • reference/audit.js 2 KB
  • reference/checklist.md 1 KB
  • reference/engines.md 2 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · masamunecode/claude-pixel-perfect-skill90MIT
fubits1/svelte-skills100MIT
bitovi/ai-enablement-prompts100MIT

Migawka bazy z 13.11.2026 · wersja paczki 9b2c566ba4cc (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100melonjs-display-and-scaling
    Pomaga, gdy gra melonJS jest rozmyta, migocze lub przycięta, oraz przy wyborze sposobu wypełnienia strony przez canvas: rozdzielczość projektowa, scale, scaleMethod, antiAlias, devicePixelRatio i skalowanie całkowite.
  • 100game-setup-and-config
    Pomaga tworzyć instancję gry Phaser 4 i konfigurować GameConfig: wybór renderera, canvas, skalowanie, pixel art, FPS, sekwencja startu i podobiekty konfiguracji.
  • 100godot-texture-import-pixel-art
    Ustawia import tekstur pixel art w Godot 4: filtr NEAREST, brak mipmap, kompresja bezstratna oraz podpowiedź filter_nearest w shaderze, nakładane na bazowy skill importu tekstur.
  • 90scenario-unity-2d
    Pomaga budować grę 2D w Unity 6.3 URP: import pixel art i sprite'ów HD, atlasy, Tilemapy, Rule Tiles, renderer 2D ze światłami, kontrolery platformówki i Pixel Perfect Camera.
  • 90godot-mesh-import-pixel-art
    Ustawia pixelowy wygląd importowanych modeli .glb w Godot: filtr NEAREST na teksturze i ocenę przy skalowaniu w dół.
  • 100pixel-art
    Generuje ilustracje pixel art w formacie SVG do plików README, dokumentacji i slajdów.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.