Hi, I'm playing around with surface movement on a river and would like the waves to continuously loop.
My plan was to make each wave 3x the width of the viewport and then reset its x location to get a loop effect but then I realized that I don't know how to crop a graphic to the viewport.
I'm pretty new to this and was wondering if someone could give me any advice or point me to a tutorial or suggest a better method?
Thanks in advance
Put Your Hands Up 4 Detroit... or at least its river.
Your river has depth, so stuff further in the background should move slower, i.e. parallax scrolling. But how? Split your content up into distinct layers, and then lerp your way to glory.
I'm using the depth of a layer as the ratio for the lerp function. This creates consistent movement, scaling, shading, etc between the different layers.
See the Pen 663cb04165ff7ba1515014844b2e251f?edit