webgl-heatmap is a browser-side rendering library that uses the GPU via WebGL to draw smooth, continuous heatmaps from large numbers of data points. Instead of relying on CPU-bound canvas operations, it leverages fragment shaders and additive blending to accumulate intensity and colorize results in real time. The API lets you push points or weighted samples into a buffer and then renders a gradient map where hot areas emerge organically from density rather than discrete markers. Because most work happens on the GPU, it scales well as the number of points grows and remains interactive for animations, live telemetry, or dynamic overlays. The library focuses on visual quality, producing anti-aliased, blur-free gradients that look good at various zoom levels and resolutions. It fits well into data-viz stacks where you need a responsive heat layer on top of maps, charts, or custom canvases, and it is compact enough to embed in dashboards and demos without heavy dependencies.
Features
- GPU-accelerated rendering via WebGL for smooth heatmap performance
- Supports floating point textures and custom gradient mapping
- Methods to add individual or batches of data points (x, y, size, intensity)
- Operations: update, display, multiply (scale), clamp, blur etc.
- Fallback / error handling when WebGL or required extensions are absent
- Example usage and demo included (example.html)