Jump to content


about onUpdate and RoundPropsPlugin

Recommended Posts



I'm fairly good user of the lib, which i find awesome. thanks ;)

I'm having this case right now where i tween a plain numeric value, which i round with the roundProps plugin, and to which i react whenever there's an update with the onUpdate() hook. As the tween runs, the onUpdate() function is fired for every single step on the way, ignoring the fact that the value is rounded in post treatment by the plugin, firing unnecessary onUpdates on the way. Is there a way to prevent that ?


Quite simple example :


let wrapper = { index: 0, length : 0 };


TweenMax.to(wrapper, 2, {
  length: 10
, roundProps: 'length'
, onUpdate: value => {


Thanks for the help,


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