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));
}
});