Jump to content
Search Community

hugo_rune

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by hugo_rune

  1. Thanks OSUblake! I was having fun with that though
  2. Yup, maxxes out at 214748 which works, 214749 goes to -214748
  3. LOL bit of further info.. 32 bit int length is 2,147,483,647 If you set NewVal to 2,147,483 in the above gsap example, it not only forgets how to count, it goes totally spare and ends up as -1
  4. 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 }});
×
×
  • Create New...