07.25 · Ambient & Background
Fire Effect
Flames flicker and rise as heat climbs and cools. Best for game and event pages.
Watch it
It moves by itself. Pause it, or turn on slow motion to watch the heat rise.
Inside, each square is one heat value, white the hottest: the hidden bottom row is always hot, heat moves up a row each step with a little sideways wobble, and it cools as it rises.
Flickers in place gives each spot new random heat every step, so it looks like static. Heat rises lifts heat from below and cools it on the way up, so it forms flames.
Try it
Change a setting and see the difference as it moves.
Flame height
Tall flames cool more slowly as they rise.
Fire shape
Campfire heats only the middle, so the flames meet in a point.
Colors
The color of the heat.
Copy the prompt
Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.
Add a fire effect to [the dark section or edge you want to set alight]. Keep a small grid of heat values whose bottom row always holds full heat. Many times a second, give each cell the heat of a cell just below it, nudged sideways and cooled a little at random, so heat rises, flickers and dies out. Color each cell by its heat with the palette the settings choose, dark when cool and brightest when hot, and draw the grid on a small canvas stretched over the area so the flames look soft. Step the grid at a fixed rate on every screen, coarser on phones. If the visitor has reduced motion turned on, show still flames. Match the settings listed below.
Your settings
Replace the words in brackets with your own element. Your settings are added at the end.
Free and open source. If this helped, a star on GitHub helps other people find it.
Star on GitHubWhat it is
The full explanation is in README.md.