Jump to content
GreenSock

anthonygreco

Easing Timeline with Successive Tweens

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

Doesn't this effectively apply the elastic ease to each tween though? I want the ease on the timeline.

Link to comment
Share on other sites

  • Solution

pls check my answer again :)

  • Like 1
Link to comment
Share on other sites

TweenMax is required here right? Can't do it with TimelineLite alone?

Link to comment
Share on other sites

nope , EasePack is required + TweenLite + TimelineLite + CSSPlugin , if you load them , you can do that with TweenLite too , pls check the Codepen , i just love TweenMax ( all of them+more included in TweenMax )  :)

  • Like 1
Link to comment
Share on other sites

Was just editing my last response.. :P Yeah, looks like TweenLite can handle it so long as the ease pack is included. Thanks a lot for the quick assist @Diaco.AW!

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