renderHeatmapLayersToCanvas()
function renderHeatmapLayersToCanvas(
scene,
canvas,
options?
): void;
Defined in: packages/core/src/render/canvas/render-heatmap.ts:22
Paints every heatmap-type layer in a Scene onto a 2D canvas, ignoring
every other layer type — the SVG renderer handles those. Backs the
canvas at cssSize x devicePixelRatio physical pixels and scales the
drawing context accordingly (PRD §8.6), so dense layers stay crisp on
retina displays without every painter needing to know about DPR itself.
Does not attempt to composite with the SVG renderer's output — stacking
the resulting canvas with an <svg> in the DOM is a consumer concern
(eventually @pitchkit/react's), not core's.
Parameters
| Parameter | Type |
|---|---|
scene | Scene |
canvas | HTMLCanvasElement |
options | RenderHeatmapOptions |
Returns
void