Jump to content
Search Community

Easing Timeline with Successive Tweens

anthonygreco test
Moderator Tag

Go to solution Solved by Diaco,

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

Can anyone tell me if this should work and I've just missed something? The idea is to create a set of tweens with linear ease, add them to a timeline with an ease and see the magic happen. :P Here's is a completely stripped down easily readable example of what I'm trying to do: http://jsfiddle.net/anthonygreco/g7a5zeek/

$(function() {

  var tl = new TimelineLite({
    ease: Bounce.easeOut
  }),
  totalDuration = 2,
  divLength = $('#container div').length;

  $('#container div').each(function(i) {

    var duration = totalDuration / divLength,
    tween = TweenLite.to($(this), duration, {
      left: 350,
      ease: Linear.easeNone
    });

    tl.add(tween);

  });

});
Link to comment
Share on other sites

Hi anthonygreco  :)

 

you can do something like this for change child's ease : 

See the Pen yyxazm by MAW (@MAW) on CodePen

 

and if you want to have Ease with whole of timeline play , you can do something like this :

var tl = new TimelineMax({paused:true});
// add tweens ....
TweenMax.to(tl,tl.duration(),{progress:1,ease:Back.easeIn})

See the Pen ZYMprY by MAW (@MAW) on CodePen

  • Like 2
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...