Jump to content
GreenSock

erikb

eased progress?

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

twn.progress()

will give you your percentage through a tween.

 

But Is there a way to get your eased percentage through a tween?

The way I am thinking to do it 'out of the box' is to tween a variable from 0 to 1 (along with my other values) and check that variable on update.

But would be super if there is an 'in the box' way I have overlooked.

Thanks!

Link to comment
Share on other sites

Hi @erikb

 

What are you trying to do?

 

The eased value is based on the progress of the tween. It doesn't work the other way around. Look at an Elastic ease. Not only does it go through the same value more than once, but it goes beyond 100% several times.

https://greensock.com/docs/Easing/Elastic

 

 

  • Like 1
Link to comment
Share on other sites

Sure, you can snag that value from the tween instance's "ratio" property. Does that help? 

  • Like 5
Link to comment
Share on other sites

  • 2 months later...

Thanks Jack.  DId not not know about that... will snag!

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