I have drawn a coil like structure
var pathCommand = "M 10 50 l 10 0 ";
for (var i = 0; i < 10; i++) {
pathCommand += "c 15 0 25 -20 15 -20 " + "c -10 0 0 20 15 20 ";
}
var pc = paper.path(pathCommand);`enter code here`
pc.attr({
stroke: '#000',
'stroke-width': 3
});
but I want to show this with animation as if it is being drawn pixel by pixel. I have tried this
var pc = paper.path("M 10 50");
for (var i = 0; i < 10; i++) {
pathCommand += "c 15 0 25 -20 15 -20 " + "c -10 0 0 20 15 20 ";
pc.animate({path: pathCommand, stroke: '#000','stroke-width': 3},2000);
}
this is not giving me what I exactly want. Can anyone tell me how should I do it to show as this is drawing progrssively, with raphael js?? Thanks for any help