Skip to content

v1.0.0

Latest

Choose a tag to compare

@mourner mourner released this 26 Oct 08:46

Breaking changes

  • Pure ESM, with a default export of the SimpleHeat class. The simpleheat() factory and CommonJS / global script builds are gone.
    import SimpleHeat from 'simpleheat';
    const heat = new SimpleHeat(canvas).data(data).draw();
  • Removed resize(). The size is now read from the canvas on each draw, so just set canvas.width / canvas.height (#20).

Improvements

  • TypeScript types built from JSDoc and checked with strict mode.
  • ~6× faster colorization using a 32-bit color lookup table.
  • No more crash on a zero-size canvas, e.g. inside a hidden map container (#33, #34, #30, #18).
  • Helper canvases use OffscreenCanvas where available, falling back to a DOM canvas in older browsers.
  • Smaller npm package: it only includes simpleheat.js and simpleheat.d.ts (#43).