finds.dev

mourner/simpleheat

A tiny JavaScript library for drawing heatmaps with Canvas

View on GitHubHomepage ↗

★ 954JavaScriptBSD-2-Clauseupdated Jul 2024

// the take

A 200-line Canvas-based heatmap renderer by Vladimir Agafonkin (Leaflet author). It blurs radial gradients onto an offscreen canvas then composites them with a color gradient — the classic approach. It's a building block, not a finished product.

No dependencies, zero build step — just drop in the JS file. The algorithm is solid: uses 'lighter' compositing for additive density then remaps through a gradient lookup table, which is efficient. Source is readable in one sitting; you can understand and fork it in an hour. Powers Leaflet.heat, so it's battle-tested on real mapping workloads.

No TypeScript types or ESM export — you're hand-rolling declarations or using a community @types package. No support for WebGL fallback, so performance caps out at a few thousand points before the Canvas API becomes the bottleneck. Value normalization is global (one max for the whole dataset), which makes sparse high-value outliers wash out everything else — common but painful. Last meaningful commit was years ago; the repo is maintained in maintenance-only mode at best.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
954
Forks
187
Language
JavaScript
License
BSD-2-Clause
Last commit
29 Jul 2024

// nearby

If simpleheat isn't quite it.

All repos →