Jump to content
Search Community

Animating different properties of a tween in timelineMax?

chinmay 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

I want to sequence an animation with timelineMax.

How is it possible to animate different properties of the same tween with specific delay?

 

E.g.

 

        var blade = $(".intro-blade");
        var logo = $(".intro-logo");
        var photo = $(".intro-photo");
          
        var introAnimation = new TimelineMax();
        introAnimation.to(blade, 1, {height:"400px", ease: Power4.easeOut,autoAlpha:1})        
         
        .to(logo, 1, {x:"-250", ease: Sine.easeOut,autoAlpha:1})
        .to(logo, 1.5, { opacity:1},"+=1.9");

 

From the snippet above, I want to animate Opacity and the transition of 'logo' with specific delay.

like The object will slide in with delayed opacity.

 

:))

  • Like 1
Link to comment
Share on other sites

Hi and welcome to the GreenSock forums,

 

Like Ohem pointed out I think the position parameter article will help a lot.

 

your code currently

 

 .to(logo, 1, {x:"-250", ease: Sine.easeOut,autoAlpha:1})
        .to(logo, 1.5, { opacity:1},"+=1.9");
doesn't animate the opacity until 1.9 seconds AFTER the logo is done sliding along x axis.
If you want some overlap try
 .to(logo, 1, {x:"-250", ease: Sine.easeOut,autoAlpha:1})
        .to(logo, 1.5, { opacity:1},"-=0.5");

in the code above the opacity will start animating 0.5 seconds BEFORE the x tween is done.

Assuming the opacity of logo starts at 0 you won't see the logo appear until after the x tween has been running for 0.5 seconds though (which may be strange).

 

To get the best assistance, it really helps if you supply a simple CodePen demo: http://greensock.com/forums/topic/9002-read-this-first-how-to-create-a-codepen-demo/

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