Jump to content
Search Community

Animation inside pinned panels

dog test
Moderator Tag

Go to solution Solved by mvaneijgen,

Recommended Posts

hi,

I'm new to GSAP and I'm struggling to implement something I thought wouldn't be too challenging.

 

My aim is for a full screen section on a webpage to pin when it reaches the top then a series of animations to play in this  first panel.

when the animation finishes the panel slides off horizontally left and  a second panel to slide in from the right to replace it.

when the 2nd panel is in place to start a series of animations inside this 2nd panel.

when the 2nd animations have finished, the section should  continue to scroll.

 

i'm having trouble with how best to structure the timelines, the scrub and the triggers.

 

i'd be very grateful if someone could point me in the right direction.

 

many thanks

See the Pen JjbXxVW by dogstar10 (@dogstar10) on CodePen

Link to comment
Share on other sites

  • Solution

Is something like this what you are trying to do? 

 

See the Pen qBqNOGM by mvaneijgen (@mvaneijgen) on CodePen

 

I've created a function of your red panel animation and `.add(timelinePanel1())` that to the ScrollTrigger timeline, when this animation is done the rest of the time line will play with the blue panel moving to the left.

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