Jump to content
Search Community

Are the parameters to some of the ease types actually documented somewhere?

justinhiggs test
Moderator Tag

Recommended Posts

Howdy, brothers and sisters of the green sock.

I'm getting up to speed on GSAP and while trying to dial in the type of ease I want for something, I was playing around with the Easing Visualizer of course.

I noticed some of them take parameters but I cannot for the life of me find any documentation on what those parameters are in the official docs. After much searching outside the forum I found one or two old references mentioning amplitude and frequency for elastic but I like to be able to see the docs for the others as well.

 

Are they right under my nose and I'm just overlooking them? Are they not documented?

 

Appreciate any help!

Link to comment
Share on other sites

Hi,

 

The only Easing functions that accept values that are not documented are Back and Elastic.

 

In the case of the Back easing function the value is pretty simple:

gsap.to(target, {
  duration:1,
  ease: "back.in(1)",
});

The bigger the value, the back easing (in/out) is bigger as well. The Ease Visualizer has dropdowns so you can play around and check that for yourself:

jrdBhxC.png

 

iq10meN.png

For the elastic easing function the first value is for the strength the elastic motion will have, for smaller values the stretching (for lack of a better word) or overshoot is larger:

9A5IJG4.pngu2s67gu.pngIn the second parameter I'm a little fuzzy in terms of what it actually is or how to correctly call it. The simplest way I can use to describe it is the frequency (repetitions) that leads to the ease to either increase (ease in) from a linear easing, or decrease (ease out) to a linear easing, based on the progress of the tween, that's why those values range between 0 and 1.

 

Any other easing function that takes values is documented in our docs:

ULinthU.png

Hopefully this helps.

Happy Tweening!

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...