Jump to content
Search Community

Toggle ease with fromTo?

derp test
Moderator Tag

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

hey,

 

I have a fromTo animation with an "Elastic.easeOut" which looks great on play(), but terrible on the reverse(). I was wondering if it is possible to toggle this?

 

I'm trying to find something to target, so something like below would be ideal. That is, unless there is a better approach to this?

 

ease: function(){
 if ( tree.reversed() ) {
  return "Power2.easeOut";
 } else {
  return "Elastic.easeOut";
 }
}

Thanks!

 

Mark

Link to comment
Share on other sites

Sorry, I have come across the updateTo function, but its saying the function is not recognised or maybe I'm using it completely wrong. I'm using easepack, css plugin, drawSVG, morphSVG, timelinemax and tweenmax.

 

var tree = new TimelineMax( { paused: true } );
tree.fromTo($( "#right_tree" ), 0.6, { 
  scaleX:"0%", 
  scaleY:"0%",
  x: 20, 
  y: 70
 },{ 
  scaleX:"1%", 
  scaleY:"1%", 
  x: 0, 
  y: 0,
  ease: Elastic.easeOut
 }, "-=0.1");

tree.updateTo( $( "#right_tree" ), {}, { ease:Power2.easeOut } );
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...