Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

infinate rotatation using an SVG in Gsap

Recommended Posts

Hello guys,
I'm new here, and i'm trying to make this SVG rotate forever, but it just won't work, i've tried making the time -1 and it still wont work.
any suggestions?

//we'll use a window.onload for simplicity, but typically it is best to use either jQuery's $(document).ready() or $(window).load() or cross-browser event listeners so that you're not limited to one.
window.onload = function(){
var logo = document.getElementById("logo");
var tween =TweenLite.to(logo, 5, {rotation:360, transformOrigin:"50% 50%"}); //keywords
Link to comment
Share on other sites

Hi and welcome to the GreenSock forums.


The trick is to use a TweenMax tween. TweenMax tweens have more features than TweenLite tweens (repeating being one of them)


Something like this

TweenMax.to(".gear", 4, {rotation:360, repeat:-1, transformOrigin:"50% 50%", ease:Linear.easeNone});



More on TweenMax: http://greensock.com/tweenmax

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.