Jump to content
GreenSock

Luisimgt

Vertical Scroll with images

Recommended Posts

Hello guys, I need your help. Can someone please help me, I appreciate your guidance, I need to work something like the example that I leave at the moment of scrolling there are several images that can be zoomed.

 

Thanks

 

108763820-d13ffe00-751f-11eb-9849-a5fd43

Link to comment
Share on other sites

What is troubling you? This is just ScrollTrigger with pin applied on the parent. The animation is basically a perspective scaling.

First build the animation then add ScrollTrigger.

You will have to calculate when the animation ends, could be as simple as some z: XXX but better way may be to calculate when the last photo is out of the viewport.

 

 

See the Pen b7599ae9273237439923abb264dfddce by dadacoded (@dadacoded) on CodePen

 

See the Pen eef87e27c0ff91f8827233b6ea4daefe?editors=1010 by dadacoded (@dadacoded) on CodePen

  • Like 3
Link to comment
Share on other sites

Hey @Luisimgt,

 

Welcome to the GreenSock Forum.

 

You could also use individual values with data.set:

 

See the Pen WNxzPBa?editors=1010 by mikeK (@mikeK) on CodePen

 

Happy tweening ...

Mikel

 

TailBreezy: What about your typo, transforOrigin (...)?

  • Like 1
  • Haha 1
Link to comment
Share on other sites

16 minutes ago, mikel said:

TailBreezy: What about your typo, transforOrigin (...)?

 

Well :) Lets' fix that.

  • Haha 1
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.
×