Hello,
I'm trying to create a page with sections moving in parallax. Each section will have an image. Some of these images will scroll normally, while for some I'd like a different movement, like scrolling slowly in the opposite direction. Basically I'd like to recreate the effect in this page: https://www.squarespace.com/websites/templates/mercer (you have to click on "PREVIEW MERCER" to see it).
I set up a pen with three sections: the first and the last one should move normally, while th
Thanks!
Here are two other functions that you can use with normalize. I consider them to be essential, and include them with every project I work on.
Lerp
I know I've mentioned this one before, but here it is again.
function lerp(min, max, ratio) {
return min + (max - min) * ratio;
}
Does the same thing as a linear tween. A tween gets its progress value by normalizing time. You can see that it will give you the same results.
See the Pen e9b1ff54efd541b1bb0be4be0