I've been trying to animate a number increment from 0 to 250,000
Interestingly, GSAP 3.0.1, once it gets above 214,000 (ish) it changes the number to a negative and counts down..
When using TweenMax (latest) the code functions as expected.
Here is a codepen of how it should work (using https://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js)
https://codepen.io/hugoartemisrune/pen/pooXMNQ
And here is the identical code that doesn't work (https://cdnjs.cloudflare.com/ajax/libs/gsap/3.0.1/gsap.min.js)
https://codepen.io/hugoartemisrune/pen/MWWMNJL
Can anyone shed any light on this matter? I'm mid port to gsap 3 and wasn't quite expecting this behavior
Thanks,
Hugo
for reference, the code in both examples is
var Cont={val:0} , NewVal = 250000 ;
TweenLite.to(Cont,1,{val:NewVal,roundProps:"val",onUpdate:function(){
document.getElementById("counter").innerHTML=Cont.val
}});