Answer the question
In order to leave comments, you need to log in
How to remove overlay from a constantly drawn canvas?
There is a canvas that constantly draws moving lines, when setting a transparent background, which I want to achieve, so that the background gradient of the page is visible behind the canvas, the overlay of a new drawing on the old one begins to occur. Tell me, please, how to get rid of it?
Below is the codepen link
https://codepen.io/wvenator/pen/BaWVwqb
Answer the question
In order to leave comments, you need to log in
I solved the problem by clearing the host with each new drawing, I wrote the following code at the beginning of the function:
$.clearRect(0, 0, canvas.width, canvas.height);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question