Jump to content
Search Community

slightly overlapping animations on the stage

jeansandjacktrequired 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 have a new question you regarding code pen:

 

See the Pen GqWxgj by PointC (@PointC) on CodePen

 

 

how can I get these animations to run a bit quicker and slightly overlap each other as one animates in and the other animates out.  I have been playing with the code a bit. I tried adding this: '-=0.15'  to the code but it didn't work.
 

var tl = new TimelineMax();
 
tl.staggerFrom(".box", 1, { cycle:{ x:[ -400,400,0,0 ],y:[0,0,-400,400] } },3)
tl.staggerTo(".box", 1, { cycle:{ x:[ 400,-400,0,0 ],y:[0,0,400,-400] },autoAlpha:0 },3,2,'-=0.15' )
tl.from(".lastBox", 1, {x:400})
 
any help is appreciated, thx
Link to comment
Share on other sites

If you want to modify the stagger part of the tweens, it is the first property after the variables on the .staggerFrom() and .staggerTo() methods

 

tl.staggerFrom(element, duration, {variables}, stagger)

 

Here's the docs section:

 

http://greensock.com/docs/#/HTML5/Sequencing/TimelineMax/staggerFrom/

 

The last line, you can add the "-=0.15" after the variables to create the overlap that you're after.

 

You might want to watch this video:

 

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