Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi sine path and infinite loop #7

Open
stcdesign opened this issue Sep 2, 2011 · 8 comments
Open

Multi sine path and infinite loop #7

stcdesign opened this issue Sep 2, 2011 · 8 comments

Comments

@stcdesign
Copy link

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

@weepy
Copy link
Owner

weepy commented Sep 2, 2011

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

@stcdesign
Copy link
Author

can you give me my request code ?

@stcdesign stcdesign reopened this Sep 2, 2011
@weepy
Copy link
Owner

weepy commented Sep 2, 2011

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)

@stcdesign
Copy link
Author

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

@stcdesign
Copy link
Author

I need to this code please help me

@weepy
Copy link
Owner

weepy commented Sep 2, 2011

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)

@creativeaura
Copy link

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

@andreabisello
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants