How to clear the canvas?
Opened this issue · 2 comments
Deleted user commented
Deleted user commented
pshihn commented
rc.ctx
is not a documented property so you should not rely on that.
you have the reference to the canvasElement and can get the context yourself. In your code, you have the canvasEle
const canvasEle = document.getElementById('canvas');
const ctx = canvasEle.getContext('2d');
ctx.clearRect(.....)