我得出一个线圈的曲线状结构如何动画在拉斐尔JS
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
});
,但我想,如果它是由像素选取的像素与动画显示这一点。 我已经试过这
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);
}
这不是给我什么,我真正想要。 任何人都可以告诉我,我应该怎么做才能显示,因为这是绘制进步,拉斐尔js? 感谢您的帮助
此链接有关于该问题的一些很好的信息。它可能有帮助。 http://stackoverflow.com/questions/4631019/how-to-draw-a-vector-path-progressively-raphael-js –
我已经尝试过,但它不是与我的案件 – Shruti
反正我有它的解决方案从我这么多的尝试:)一个工作 – Shruti