Jump to content
Search Community

HELP : Fix the jumping logic required to make an seemless loop

IMNOTAROBOT test
Moderator Tag

Go to solution Solved by IMNOTAROBOT,

Recommended Posts

Hello there , 

I was hoping To Recreate this effect i saw on Nathan Smith's portfolio , there is this sick Infinite scrolling animation Which i Really liked  and wanted to recreate that . 

CodePen Example

 

THINKING PROCESS 

  1.  There are 2 divs  , Hero and Projects .
  2.  There are two Seperate observers , one tracking the scrolling of window and another tracking if process div is in view port 
  3. If Projects is  in viewport , tween  hero
  4.  YPercent property of Process  is also changed everytime user scrolls using the OnUp and OnDown process ( i know this is inefficient , idk better way to do so ) . 
  5. I am also tracking the  ScrollTrigger.positionInViewport(".projects", "bottom") value . 
  6. if the above value goes lower than a certain threshold , i want to trigger "reset" to animation. 

PROBLEM: 

idk how to reset the animation such that projects goes back to initial conditions and animation restarts seemlessly. I would really appreciate if you would give the code a look , also checkout nathan's website and how he implemented it . thank you and Happy new year 

 

 

 

 

 

See the Pen YzgybVL by aryan-kathawale (@aryan-kathawale) on CodePen

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