jquery.path icon indicating copy to clipboard operation
jquery.path copied to clipboard

Multi sine path and infinite loop

Open stcdesign opened this issue 14 years ago • 8 comments

hello I need to create sine style with multi cyrcle and start automaticly without stop cyrcles (infinite loop) how can i do this ?

stcdesign avatar Sep 02 '11 11:09 stcdesign

might be best to just use a timer and update the css from within. jquery.animate is normally for fixed duration animations

weepy avatar Sep 02 '11 11:09 weepy

can you give me my request code ?

stcdesign avatar Sep 02 '11 11:09 stcdesign

can you give me my request code ?

what does that mean ?

On Fri, Sep 2, 2011 at 12:50 PM, stcdesign [email protected] wrote:

can you give me my request code ?

Reply to this email directly or view it on GitHub: https://github.com/weepy/jquery.path/issues/7#issuecomment-1978335

weepy avatar Sep 02 '11 12:09 weepy

can you give me this code ? my request : sine style with multi circle and start automaticly without stop (infinite loop)

stcdesign avatar Sep 02 '11 12:09 stcdesign

I need to this code please help me

stcdesign avatar Sep 02 '11 18:09 stcdesign

sorry i dont understand

On Fri, Sep 2, 2011 at 7:47 PM, stcdesign [email protected] wrote:

I need to this code please help me

Reply to this email directly or view it on GitHub: https://github.com/weepy/jquery.path/issues/7#issuecomment-1981956

weepy avatar Sep 02 '11 19:09 weepy

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();

creativeaura avatar Sep 29 '11 11:09 creativeaura

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).

andreabisello avatar Aug 14 '12 09:08 andreabisello