Jump to content
Search Community

Need some time of empty scroll or delay in horizontal scroll.

Yagnik Patel test
Moderator Tag

Recommended Posts

Hello guys, Hope you all are well. I need some help with the horizontal scroll animation, I have used the same logic given in the codepen but I need some empty scroll time for each horizontal slide or more pin time while scrolling so that each slide can be seen properly. Hope you get it. Thanks in advance.

See the Pen oNVGjMm by Yagnikpatel (@Yagnikpatel) on CodePen

Link to comment
Share on other sites

I see two horizontal sections D1 and D2 and you use a single tween to move the elements to some other position. I don't know where you would want to add a pause (empty scroll time) for your effect, but personally I would always create a timeline instead of a single tween. You never know if you want to add tweens in the future and separating the ScrollTrigger from the tweens make things so much easier to read. Right now I've just add an empty tween to the end of the time line of 0.5 seconds, so now your animation and the pause take up the same amount of scroll distance. 

 

See the Pen eYXGJOK?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen

 

I've written a guide how you could setup such animations. I called it stacking cards, but with the logic you can easily also create your effect, but have much more control. See example below. Hope it helps and happy tweening! 

 

 

See the Pen yLwzYdp?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen

  • Like 2
Link to comment
Share on other sites

17 hours ago, mvaneijgen said:

I see two horizontal sections D1 and D2 and you use a single tween to move the elements to some other position. I don't know where you would want to add a pause (empty scroll time) for your effect, but personally I would always create a timeline instead of a single tween. You never know if you want to add tweens in the future and separating the ScrollTrigger from the tweens make things so much easier to read. Right now I've just add an empty tween to the end of the time line of 0.5 seconds, so now your animation and the pause take up the same amount of scroll distance. 

 

 

 

 

I've written a guide how you could setup such animations. I called it stacking cards, but with the logic you can easily also create your effect, but have much more control. See example below. Hope it helps and happy tweening! 

 

 

 

 

Hi @mvaneijgen , Thanks for your response. I want to add delay for both horizontal screens D1 and D2, like delay after reaching D1 and also the same after reaching to  D2 screen. while I reach on each screen and it should be pinned for a few seconds or a few scrolls, Hope you got my point.

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