I have a curved line drawn on a canvas:
var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
ctx.beginPath();
ctx.moveTo(20,20);
ctx.bezierCurveTo(20,100,200,100,200,20);
ctx.stroke();
How can I animate this line by pixels? By default, it should disappear. And after appear by pixels.
I tried to do this dynamically using JS, but canvas does not work in this case.