Jump to content
Search Community

time shift for TweenMax

one2gov test
Moderator Tag

Go to solution Solved by Carl,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Not sure i understand exactly but using my example you can seek() to when the last ball is moved into position

tl.timeScale(0.5).seek(balls.length)

demo updated: 

See the Pen qqyrME by GreenSock (@GreenSock) on CodePen

Is there other way to do the same thing without timescale? I have to use it in my project timeline, where is timescale is normal..

Link to comment
Share on other sites

You can also do a negative delay. Here's an interesting thread with some nice demos showing that...

http://greensock.com/forums/topic/14486-help-with-overlapping-items-on-repeat-timeline/

 

And if you're going to use that bezier function, you don't set an x or y value. That's calculated in the Bezier points.

TweenLite.set(ball, { 
  xPercent: -50, 
  yPercent: -50, 
  // x: -radius, // NOT HERE...
  // y: -radius // OR HERE...
});

Pass the radius into the function. 

tl.to(ball, 1, {
  // y: radius, // OR HERE...
  bezier: getBezier(0, 0, radius), // SET THE RADIUS HERE
  ease: Linear.easeNone,
  repeat: -1,
}, -i / balls.length); // NEGATIVE DELAY

And if you pass in 2 different radii into the bezier function, the rotation will be elipitical instead of circular..

tl.to(ball, 1, {
  bezier: getBezier(0, 0, 200, 100), // ELLIPTICAL ROTATION
  ease: Linear.easeNone,
  repeat: -1,
}, -i / balls.length);

tl.to(ball, 1, {
  bezier: getBezier(0, 0, 200), // CIRCULAR ROTATION
  ease: Linear.easeNone,
  repeat: -1,
}, -i / balls.length);

See the Pen ZBjyMX?editors=0010 by osublake (@osublake) on CodePen

  • Like 3
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.
×
×
  • Create New...