1
J'ai un problème pour trouver un moyen de boucler mon animation avec raphaeljs.Problèmes ayant une boucle raphaeljs sur l'animation
Je l'ai déjà vu ce post
Why won't my Raphael JS animation loop?
cependant faire la même chose sur mon animation ne fonctionnait pas, wich signifie son exécutée une seule fois. Mon code est:
var ciclo = function() {
var ex = easingx.value,
ey = easingy.value;
c.animate({
"20%": {cy: 150, easing: ey,opacity: 100, callback: fade(0)},
"40%": {cy: 250, easing: ey, callback: fade(1)},
"60%": {cy: 250, easing: ey, callback: fade(2)},
"80%": {cy: 150, easing: ey, callback: fade(3)},
"90%": {cy: 50, easing: ey, callback: fade(4)},
"100%": {cy: 50, easing: ey,opacity: 0, callback: fade(5)}
}, 5000).animate({
"20%": {cx: 50, easing: ex},
"40%": {cx: 100, easing: ex},
"60%": {cx: 200, easing: ex},
"80%": {cx: 250, easing: ex},
"90%": {cx: 200, easing: ex},
"100%": {cx: 100, easing: ex}
}, 5000,ciclo)
};
ciclo();