Jump to content
GreenSock

Ivan Mocs

How make lerp effect with gsap

Go to solution Solved by GreenSock,

Recommended Posts

is it possible to make a lerp effect with gsap, I want when scrolling the distance between elements expands and returns to its original value again.

Frame 152.jpg

See the Pen rNrLogJ by adeivan (@adeivan) on CodePen

Link to comment
Share on other sites

Yes. This is probably something you'd have to to with a combination of quickTo and ScrollTrigger.

This post:

Discusses how to achieve an lerp like effect similar to what you are trying to achieve. Instead of attaching the logic to a mousemove event listener, you put it in a scrollTrigger onUpdate.

Link to comment
Share on other sites

  • Solution

That effect is SUPER easy to create if you use ScrollSmoother and its “lag” feature. Give each one a slightly different lag value to offset/stagger them. 

  • Thanks 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.
×