Drawing on a Dynamic Texture over existing image

Hi,

When you do ctx.clearRect, you clear the original fill and image you put on it, so you’d have to draw those again before drawing the heat map. Also, ctx.putImageData just overwrites the pixels without alpha blending them as it would with ctx.drawImage.

This works:

https://www.babylonjs-playground.com/#T100FS#19

And thanks for sharing the SimpleHeat link, it looks interesting!

1 Like