Jump to content
Search Community

Directly accessing /using ease functions

DAVD test
Moderator Tag

Go to solution Solved by OSUblake,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Is there a way to directly use the penner easing functions (and other) included in GSAP?

 

I run my own update loop (on Scroll) and just want to pass my values through the easing functions to make everything a tiny bit more awesome.

 

Example of what I would like to do. passing in p (value of 0 to 1) start value 0, change value 1, and duration 1.

Power2.easeInOut(p,0,1,1);

right now I define the functions again in my code like this:

 

var easeInSine = function (t, b, c, d) {
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
}
easeInSine(p,0,1,1);

would be great to hook into the greatness of Greensock instead of defining them again.

 

I'm using the latest js and tweenmax.

Link to comment
Share on other sites

  • 5 years later...

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