Skip to main content
A glowing gradient of colors flowing through an input shape. The effect creates a smoothly animated wave of intensity across the image, perfect for creating attention-grabbing effects.

Features

  • Animated gradient flow
  • Customizable color palette (up to 10 colors)
  • Inner and outer glow controls
  • Contour intensity adjustment
  • Directional animation
  • Image preprocessing for optimal results

Basic Usage

Parameters

Visual Parameters

string | HTMLImageElement
required
Source image/logo to apply the heatmap effect to. The image will be preprocessed automatically in React.
string[]
Array of up to 10 gradient colors (from cold to hot) in hex, rgb, or rgba format
string
default:"'#000000'"
Background color in hex, rgb, or rgba format
number
default:"0.5"
Heat intensity near the edges of the input shape
number
default:"0"
Direction of the heatwave animation in degrees
number
default:"0"
Grain applied across the entire graphic for texture
number
default:"0.5"
Size of the heated area inside the input shape
number
default:"0.5"
Size of the heated area outside the input shape
boolean
default:"false"
(React only) Suspends the component when the image is being processed. Useful with React Suspense.

Sizing Parameters

'none' | 'contain' | 'cover'
default:"'contain'"
How to fit the shader into the canvas dimensions
number
default:"0.75"
Overall zoom level of the graphics
number
default:"0"
Overall rotation angle in degrees
number
default:"0"
Horizontal offset of the graphics center
number
default:"0"
Vertical offset of the graphics center

Animation Parameters

number
default:"1"
Animation speed multiplier
number
default:"0"
Manual frame control for animation

Presets

The Heatmap shader comes with built-in presets:
  • Default: Blue to red fire gradient
  • Sepia: Warm brown to white gradient with high noise

Examples

Fire Effect

Sepia Glow

Electric Blue

Image Preprocessing

React (Automatic)

In React, image preprocessing happens automatically:
Set suspendWhenProcessingImage to true to use React Suspense during processing.

Vanilla JavaScript (Manual)

For vanilla JavaScript, you must preprocess images manually:

What Preprocessing Does

The preprocessing function:
  1. Converts the image to grayscale
  2. Generates multiple blur levels
  3. Creates edge detection data
  4. Packages everything into RGB channels of a single image
This allows the shader to efficiently compute the heatmap effect.

Technical Details

Shader Uniforms (Vanilla JS)

When using the vanilla JavaScript API:

Animation

The Heatmap shader features:
  • Multiple animated waves flowing through the shape
  • Smooth gradient transitions
  • Directional control via angle parameter
  • Synchronized timing for natural appearance

Color Gradient

Colors are interpolated smoothly across the heat levels. The gradient flows from:
  • First color (cold/dark areas)
  • Middle colors (medium heat)
  • Last color (hot/bright areas)
You can use 2-10 colors for different effects.

Performance Notes

  • Animated shader with continuous rendering
  • Image preprocessing happens once per image
  • Preprocessing time depends on image size (~100-500ms typical)
  • Multiple blur passes computed during preprocessing
  • Runtime performance is excellent after preprocessing
  • Best with logo/icon images rather than photos