Jump to content
Search Community

Two-Column ScrollTrigger (Sticky) with Zoom-Out and Reveal

rm2773 test
Moderator Tag

Recommended Posts

Hi everyone!  I apologize in advance for the incomplete Codepen, but I think it demonstrates what I want to do.   

 

My example shows a map section (position:sticky) that is 6 x 6 columns, with an image on left and content on right.

 

I'm wanting to achieve the following sequence of animations:

 

1) User scrolls down the page until they arrive at the Map section, which becomes "sticky".

2) Map section displays the SVG without the green color, and the animation begins (Codepen currently shows green visible at all times).

3) The user scrolls.... and map rotates and zooms out simultaneously, while also being unmasked by a rectangle shape

4) Once the 3rd content section becomes visible, I want the rotation to end, and finally the animation will reveal the green shaded area, from left to right.

5) By this time along with #4 above, the entire SVG should display behind both columns.

6) All animations mentioned above should be fully complete by the time the user scrolls out of the section

 

I love GSAP and I really appreciate the great talent in these forums....I'm a Shockingly Green member and having the extra plugins available to members, is surely worth it.  

 

Thanks in advance! Rob

 

 

See the Pen PodbxKx by rm2773 (@rm2773) on CodePen

Link to comment
Share on other sites

Hi,

 

What exactly is not working in your demo? The timing between the sections in the right appearing and the rotation of the SVG element?

 

I think the problem here could be on the fact that you're creating a lot of ScrollTrigger instances. If you want to control this over just one section of scroll, why no just create a single timeline that is controlled by a single ScrollTrigger instance?

 

I think the best approach here is to completely remove ScrollTrigger and focus on getting the animation working in the way you intend, then once the animation looks exactly how you want, add ScrollTrigger back to the mix. You might want to check this video to see what I mean:

 

Hopefully this helps,

Happy Tweening!

Link to comment
Share on other sites

I'm confused as to how to reveal the green shaded area at the end of the timeline.  I'm not exactly sure how to layer-in another image reveal efficiently while all the other animations are happening; or at very least, I'm not sure of the best approach for doing so.  Like should I use a single SVG and reveal the green area?  Or use two images and fade one in?

 

I understand what you mean with multiple scrollTrigger instances, and will definitely re-factor that code - thanks for the suggestion.

Link to comment
Share on other sites

Hi,

 

What green shaded area? This one?

bMNwc7m.png

 

There are a lot of ways to reveal an image, especially if that image resides inside an SVG tag. Mask, Clip, Opacity are just three I can think of.

 

As I said I'm not sure I'm seeing the issue you mention in the codepen example, that's why we need you to be as explicit as possible about it.

 

Finally I strongly recommend you again to remove ScrollTrigger from this until your animation works in the way you want.

 

Happy Tweening!

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