Heatmap applies a multi-color glowing gradient that flows through an input shape or logo. The effect produces inner and outer glows that animate along a configurable axis, with support for up to 10 gradient colors.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/paper-design/shaders/llms.txt
Use this file to discover all available pages before exploring further.
This shader requires an image preprocessing step before passing to the GPU. The
toProcessedHeatmap helper must be called first to generate the required texture encoding. The React component handles this automatically. In vanilla JS, call toProcessedHeatmap yourself and pass the result as u_image.Usage
- React
- Vanilla JS
toProcessedHeatmap internally and re-runs it whenever image changes. Use the suspendWhenProcessingImage prop to integrate with React Suspense:Props
The source image (logo, icon, or shape) to apply the heatmap effect to. In React, pass a URL string. In vanilla JS, pass the pre-processed
HTMLImageElement returned by toProcessedHeatmap.Animation playback speed multiplier.
Array of up to 10 CSS color strings defining the heatmap gradient from coolest to hottest.
Background color shown behind the effect.
Heat intensity near the edges of the input shape. Range:
0 to 1.Size of the heated area inside the input shape. Range:
0 to 1.Size of the heated area outside the input shape. Range:
0 to 1.Direction of the heatwave animation in degrees. Range:
0 to 360.Amount of grain applied across the entire graphic. Range:
0 to 1.React only. When
true, the component suspends while toProcessedHeatmap is running. Wrap in a <Suspense> boundary to provide a fallback.Presets
The following presets are exported from@paper-design/shaders-react:
| Export | Name | Description |
|---|---|---|
defaultPreset | Default | Classic heatmap from deep blue to orange-red |
sepiaPreset | Sepia | Two-color sepia tone with added noise |
toProcessedHeatmap helper
toProcessedHeatmap performs a CPU-side preprocessing pass that encodes the image into the multi-channel texture the shader expects:
blob is a PNG where:
- R channel — contour (edge gradient)
- G channel — outer blur
- B channel — inner blur