I am working with canvas. I have draw a set of lines. Here is my sample code
for(var i = 0 ; i< points.length; i++){
var point = points[i];
setInterval(function() {
ctx.strokeStyle = "black";
ctx.moveTo(point.startX, point.startY);
ctx.lineTo(point.startX1, point.startY1);
ctx.stroke();
}, 500);
}
This code draws line after every 0.5 seconds. But I wish to animate it progressively. So kindly help to draw a line progressively.
This screen shot show the output. I made this possible in SVG. But I need the same in canvas.