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

pixel-fire

/pixel-fire

Buduje na Canvas 2D pikselowy ogień z symulacji ciepła, który reaguje na wskaźnik i można go zdmuchnąć, a potem odrasta.

Repozytorium
design.how ↗
Licencja
MIT
Ostatnia zmiana repozytorium
05.11.2026

Ocena i bezpieczeństwo

95/ 100Klasa: dobry
Format20 / 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ść35 / 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
7
Skrypty
5
Komentarze HTML
0
Adresy URL w SKILL.md
1
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ą
  • 5 skryptów w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: assets/template/card.tsx, assets/template/engine.ts, assets/template/params.ts, assets/template/runtime/use-pause.ts, scripts/check.mjs

Co robi i kiedy

Buduje na Canvas 2D pikselowy ogień z symulacji ciepła, który reaguje na wskaźnik i można go zdmuchnąć, a potem odrasta.

Oryginalny opis (EN)

Builds a Canvas 2D pixel-art fire, a 16 by 16 flipbook generated from a tiny heat simulation and drawn as crisp blocks on a stone block, with a live pixel buffer the pointer edits by pushing lit cells up and along its travel and heating them white, and a tap that blows the flame out to regrow. Use when someone asks for a pixel fire, a retro game flame, an interactive pixel-art sprite, a campfire animation, or a flame you can blow out.

Jak działa

  1. What to build
  2. Workflow
  3. FIXED
  4. VARIABLE
Sekcje z nagłówków SKILL.md, w oryginale · 43 linii, 647 słów
Podgląd SKILL.md
---
name: pixel-fire
description: Builds a Canvas 2D pixel-art fire, a 16 by 16 flipbook generated from a tiny heat simulation and drawn as crisp blocks on a stone block, with a live pixel buffer the pointer edits by pushing lit cells up and along its travel and heating them white, and a tap that blows the flame out to regrow. Use when someone asks for a pixel fire, a retro game flame, an interactive pixel-art sprite, a campfire animation, or a flame you can blow out.
---

# Pixel fire

A 16 by 16 pixel-art fire on a block, where the pointer moves the real pixels and a tap blows it out. See it live at https://design.how/vault/pixel-fire.

## What to build

A small pixel-art fire burns on a dark red block in the middle of a pale green card. The flame is 16 by 16 texels at 60 percent of the card's height, drawn with smoothing off so every texel is a hard square, and the block under it is the same width, cut off by the bottom edge.

The flipbook is generated, not drawn. A hot row sits under the texture, hotter in the middle than at the sides. Every step each cell passes its heat one row up, drifting a column left or right at random and losing a little, so tongues rise and break apart. After a warm-up, 32 steps become 32 frames, played at 18 a second. Heat maps to seven colours from deep red to near white, and alpha is binary: a texel is solid fire or a clean gap, never half transparent.

The pointer edits a live buffer, not a frame. Normally the buffer copies the current frame. Within 2.8 texels of the pointer, lit cells are moved one to four texels along the pointer's travel and upward, heated toward white, and the cells they leave become gaps. Disturbed cells then relight from the flipbook at random, so a carved hole fills in raggedly while the animation keeps playing underneath. The tips also lean toward the pointer by up to two whole texels, and a tap empties every lit cell at once.

## Workflow

1. Copy `assets/template/` into the project, for example to `components/pixel-fire/`. It is React and TypeScript: `params.ts`, `engine.ts`, `card.tsx`, plus `runtime/`, the small helpers they import.
2. Read the FIXED steps below before touching the code. They are what makes the effect; keep them.
3. Change only the VARIABLE values in the params file, or pass them as props where the card takes them.
4. Mount the card in a box with a fixed aspect ratio of 1344 / 520, so the page never shifts when it paints.
5. Read `references/perf.md` before changing the engine or mounting several visuals on one page.
6. Run `node scripts/check.mjs components/pixel-fire` on the copied folder, fix every line it prints, and rerun until it prints ok.

## FIXED

- Generate the flipbook once from a seeded heat simulation: a hot source row, heat passed up a row per step with a random sideways drift and a random loss.
- Map heat to a short ramp of flame colours with binary alpha, and drop cells below a threshold to gaps.
- Keep a mutable RGBA buffer. Undisturbed cells copy the current frame exactly; disturbed ones relight from it at random and relax back.
- Under the pointer, move lit cells along its velocity plus an upward bias, heat them, keep the brighter colour at the destination, and clear the source.
- Shift each row toward the pointer by a whole number of texels that grows toward the tips, then put the buffer in a 16 by 16 canvas and draw it scaled with smoothing off.
- Under reduced motion, draw one flipbook frame untouched.

## VARIABLE

| Name | Default | What it changes |
|-|-|-|
| `FLAME` | seven colours, deep red to near white | The flame ramp, coolest first. |
| `COOL_MIN, COOL_RANDOM` | 0.02, 0.065 | Heat lost per row. Higher makes shorter, raggeder tongues. |
| `FPS` | 18 | Flipbook speed. |
| `BURN_RADIUS` | 2.8 | How many texels the pointer reaches. |
| `HEAL_RATE` | 6 | How fast a carved hole relights. |
| `BLOCK, GROUND` | dark reds, #f0f7ee | The block's colours and the card's ground. |
| `SEED` | 7 | The roll both textures come from. |
Pliki w paczce (7)
  • SKILL.md 4 KB
  • assets/template/card.tsx 2 KB
  • assets/template/engine.ts 8 KB
  • assets/template/params.ts 3 KB
  • assets/template/runtime/use-pause.ts 2 KB
  • references/perf.md 2 KB
  • scripts/check.mjs 6 KB

Wersje

W bazie nie ma innych skilli o nazwie pixel-fire.

Migawka bazy z 13.11.2026 · wersja paczki d4a19016de56 (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

  • 100pixel-art-generation
    Generuje grafikę pixel art do gier: sprite'y, animacje, tła i miniatury, dzieli arkusze sprite'ów i usuwa tła ze sprite'ów.
  • 96truepixel
    Zamienia obraz pixel art wygenerowany przez AI w czysty sprite: jeden piksel na komórkę, mała paleta i przezroczyste tło.
  • 95openpixel-pixel-art
    Tworzy, poprawia i animuje czytelną grafikę pixel art w OpenPixel, zaczynając od pytań i szkicu SVG do akceptacji.
  • 100style-pixel-art
    Tworzy pixel art na siatce niskiej rozdzielczości skalowanej metodą nearest-neighbour, ze sprite'ami z map znakowych, paletą i małymi pętlami animacji klatka po klatce w 10 fps.
  • 90pixel-art
    Zamienia obraz referencyjny w pixel art 64x64 z bramkami akceptacji i zapisuje wynik jako HTML, PNG i SVG, z tłem i bez tła.
  • 87pixel-art-studio
    Tworzy grafikę pikselową i animacje programowo: sprite'y, arkusze sprite'ów, pikselowanie obrazów i postaci w stylu retro.

Uwagi i zgłoszenia

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