Jump to content
Search Community

Utility Methods and Easing

Dustyn Eskelson test
Moderator Tag

Recommended Posts

hmm, i'm not understanding exactly what you want. 

Have you looked at the distribute() utility function? It makes ease-based distribution of values very easy: https://greensock.com/docs/v3/GSAP/UtilityMethods/distribute()

 

 

also keep in mind that eases themselves are functions that return values based on the progress you pass in.

 

So you can do something like Power4.easeIn(0.3) and get the corresponding y value on the ease graph.

 

Perhaps this pen will help you understand how it works

 

See the Pen ZEpzdZq by snorkltv (@snorkltv) on CodePen

 

click around and you'll see you get more small circles than large circles

 

You can do a similar thing with CustomEase by passing it into parseEase.

 

open the console on this pen:

See the Pen GRWmwqe?editors=1111 by snorkltv (@snorkltv) on CodePen

 

Once you interpolate your value perhaps you can pass that into your CustomEase

 

if you need more help please provide a minimal demo and some more info on what you want to do.

  • Like 3
Link to comment
Share on other sites

I'm sorry, was totally clear in my head, haha.

 

So I'm using an interpolate utility method inside a timeline onUpdate function. I'm feeding it this.progress() to interpolate the start, end values. This works great but I would like to  ease that interpolation rather than just a linear transition.

 

Update:

Read through your responses and I did not realize Eases were functions... All I needed was to wrap this.progress() with an Ease function and I got what I wanted!

 

Thank you!

Dusty

  • Like 1
Link to comment
Share on other sites

LOL. Carl Googles "GreenSock ease curves" and finds a video by.... hmmm... this Creative Coding Club looks interesting. 🤣

 

Don't feel too bad my friend. I've Googled a couple things and found my own tutorials and/or answers I posted here in the forum. :)

  • Haha 3
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...