Romiar Posted December 28, 2019 Share Posted December 28, 2019 Hi. I have a strange issue with TweenMax. I'm trying to create a counter with TweenMax and when i launch the code, in the update i have these values: 70704 index.ts:17 97500 index.ts:17 129511 index.ts:17 160944 index.ts:17 191799 index.ts:17 -209185 index.ts:17 -179452 index.ts:17 -150297 index.ts:17 -123385 index.ts:17 -95352 index.ts:17 -67897 index.ts:17 -42585 index.ts:17 -16252 index.ts:17 9503 index.ts:17 33215 index.ts:17 57848 index.ts:17 80504 index.ts:17 104015 index.ts:17 126948 index.ts:17 149303 can you help me? I'm using this code: var counter = { var: 0 }; TweenMax.to(counter, 1, { var: "1000000", onUpdate: function () { console.log(Math.ceil(counter.var)); } }); Link to comment Share on other sites More sharing options...
Romiar Posted December 28, 2019 Author Share Posted December 28, 2019 Ok. I have founded something strange. With values under "214000" it works great, but when i increase this limit, all go wrong. i'm loading the "gsap.min.js" library and i'm using it with Typescript Link to comment Share on other sites More sharing options...
ZachSaucier Posted December 28, 2019 Share Posted December 28, 2019 Hey Romiar, This is a known issue in previous versions of GSAP 3. Please upgrade to the latest, GSAP 3.0.4, where this is fixed. You can get it from a CDN: https://cdnjs.cloudflare.com/ajax/libs/gsap/3.0.4/gsap.min.js Download it or pull the latest version from NPM. 1 Link to comment Share on other sites More sharing options...
Romiar Posted December 28, 2019 Author Share Posted December 28, 2019 Hi Zach. It works!!!!! Thanks a lot man 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now