Multi sine path and infinite loop
stcdesign opened this issue · comments
hello
I need to create sine style with multi cyrcle and start automaticly without stop cyrcles (infinite loop)
how can i do this ?
might be best to just use a timer and update the css from within.
jquery.animate is normally for fixed duration animations
can you give me my request code ?
can you give me my request code ?
what does that mean ?
On Fri, Sep 2, 2011 at 12:50 PM, stcdesign
reply@reply.github.com
wrote:
can you give me my request code ?
Reply to this email directly or view it on GitHub:
#7 (comment)
can you give me this code ?
my request : sine style with multi circle and start automaticly without stop (infinite loop)
I need to this code please help me
sorry i dont understand
On Fri, Sep 2, 2011 at 7:47 PM, stcdesign
reply@reply.github.com
wrote:
I need to this code please help me
Reply to this email directly or view it on GitHub:
#7 (comment)
You can wrap the code in a function and execute again on animate function complete callback.
function CircleArc1(){
var arc_params = {
center: [560,80],
radius: 17,
start: 0,
end: 1,
dir: -1
}
$("#circle").animate(
{path : new $.path.arc(arc_params)},
7000,
"linear",
CircleArc1
);
}
CircleArc1();
you can use this code to make an infinite rotation loop with the same speed ( as the solar system for example )
function planetRevolution(whatPlanet , thisStart,thisEnd){
var centroDellaRivoluzioneX = $(window).width() / 2 ;
var centroDellaRivoluzioneY = $(window).height() / 2 ;
$(whatPlanet).animate({
path : new $.path.arc({
center : [centroDellaRivoluzioneX, centroDellaRivoluzioneY],
radius : 200,
start : thisStart,
end : thisEnd ,
dir : -1
})
},revolutionTime,'linear',function() { planetRevolution(whatPlanet,thisStart,thisEnd); });
}
my code is in italian, but, i make a function to create the arc animate, and on the callback of the animate i use the same function.
lineaer make the speed equal (with out acceleration).