pixel-perfect
/pixel-perfect
Pilnuje, by gry i strony z pixel artem renderowały się ostro: jedna rozdzielczość, skalowanie całkowite i filtr nearest.
- Autor
- masamunecode ↗
- Repozytorium
- claude-pixel-perfect-skill ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 05.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 4
- Skrypty
- 1
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 05.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 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
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
- The rules
- How to apply
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
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · masamunecode/claude-pixel-perfect-skill | 90 | MIT |
| fubits1/svelte-skills | 100 | MIT |
| bitovi/ai-enablement-prompts | 100 | MIT |
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.