TweenLite.defaultEase = Linear.easeNone;
var header = document.querySelector("h1");
var obj = {
value:0
}
//round to increments of 10
TweenLite.to(obj, 5, {value:600,
roundProps:{
value:10
},
onUpdate:function() {
header.innerHTML = obj.value;
}
})
//round to increments of 100
TweenLite.to(".green", 5, {x:600,
roundProps:{
x:100
}, onUpdate:function() {
this.target[0].innerText = this.target[0]._gsTransform.x;
}
});
//round to increments of 200
TweenLite.to(".orange", 5, { x:600,
roundProps:{
x:200
}, onUpdate:function() {
this.target[0].innerText = this.target[0]._gsTransform.x;
}
});