Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
AslanGoi

Is it possible to make pin with delay and smooth transition?

Recommended Posts

Hey!

I have a question about pinning in ScrollTrigger.

Is it possible to make pinning with scrub?

I mean when I scroll, pinned element should catching up its fixed position with smooth ease.

I understand that it uses position: fixed, so I can't imagine how it can be done.

 

Can you give me advice, please?

See the Pen NWxgyoM by ChicagoJostik (@ChicagoJostik) on CodePen

Link to post
Share on other sites
23 minutes ago, ZachSaucier said:

Are you talking about creating an effect like this site? https://www.marvinschwaibold.com/

@ZachSaucierHey, Zach!

No, I mean when element is pinned, you scroll down and element is moving with the same speed as scrollbar, right?

But what if we can make when you scroll, pinned element will move with some delay relatively to scrollbar.

 

For example, popular gsap cursor animation, if we use gsap.set() it will be deadly pinned to cursor, but if we use gsap.to() with some duration,

the cursor will be moving with duration, right? So in my codepen pinned element is the cursor with gsap.set(), but I want to make gsap.to() with duration.

 

Did you undestand my explanation?) I'm so sorry.

Link to post
Share on other sites

I think that's pretty much what the site that I linked to is doing except it's not just during a pin :) Unless I'm misunderstanding you. Do you know of a website that does the effect that you're talking about?

  • Like 1
Link to post
Share on other sites
6 minutes ago, ZachSaucier said:

Do you know of a website that does the effect that you're talking about?

No(

But after our dialogue I've found out that I can make animation that I want like this:

See the Pen MWKoLEq by ChicagoJostik (@ChicagoJostik) on CodePen

😅 sorry for disturbing you!

  • Like 2
Link to post
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.

×