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.

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.

More optionsFewer options

Wind

Leans the flames to one side.

Small sparks drift up from the flames.

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.

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 GitHub

What it is

The full explanation is in README.md.

Good for

  • Game sites
  • Sale and event banners
  • Night and festival themes

Avoid on

  • Reading pages
  • Light themes