Jump to content
Search Community

How to make a mouse follower with elastic effect?

ayank007 test
Moderator Tag

Go to solution Solved by Rodrigo,

Recommended Posts

  • Solution

Hi @ayank007 and welcome to the GreenSock forums!

 

This fork of the quickTo() example should help:

See the Pen wvEdGgG by GreenSock (@GreenSock) on CodePen

 

You can read more about it here:

https://greensock.com/docs/v3/GSAP/gsap.quickTo()

 

Hopefully that's enough to get you started. Let us know if you have more questions.

Happy Tweening!

  • Like 1
Link to comment
Share on other sites

17 hours ago, Rodrigo said:

Hi @ayank007 and welcome to the GreenSock forums!

 

This fork of the quickTo() example should help:

 

 

 

You can read more about it here:

https://greensock.com/docs/v3/GSAP/gsap.quickTo()

 

Hopefully that's enough to get you started. Let us know if you have more questions.

Happy Tweening!

Thanks,
The demo is working for just "elastic". What can I do to config like "elastic.out(1, 0.3)"?

Link to comment
Share on other sites

Hi,

 

Just use the particular elastic config you want to use. That is just a better way to create repetitive GSAP instances nothing more, the configuration options are the same:

let xTo = gsap.quickTo(".ball", "x", {duration: 0.6, ease: "elastic.out(1, 0.3)"}),
    yTo = gsap.quickTo(".ball", "y", {duration: 0.6, ease: "elastic.out(1, 0.3)"});

Happy Tweening!

  • Like 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.
×
×
  • Create New...