Closed xudamin closed 4 years ago
here is the bug code.
let test = {height: 0}
let tl = new TimeLineLite({
onUpdate: function() {console.log(test.height)}
})
tl.add(TweenLite.to(test, 2, {height: 1000000}))
Works fine here. https://codepen.io/osublake/pen/20c890a27a391f9d4a05b596519b2ea9
Make sure you're using the latest version. There was a bug in older version for large numbers.
BTW, TweenLite, TweenMax, TimelineLite, and TimelineMax are deprecated.
gsap.timeline({
onUpdate() {
console.log(test.height)
}
})
.to(test, {
duration: 2,
height: 1000000
})
Perhaps you're using an old version of GSAP? There was a bug in an earlier version of GSAP 3 that had this issue.
I use TweenLite/TimelineMax to translate 0 to 1000000, the result display wrong. here are some picture: I expect height from 0 to 1000000. the result is wrong。 but when I transform height from 0 to 100000. the result is correct。