TWEEN ANIMATION
Targets: object
A JavaScript Object with at least one property containing a numerical value.
Type | Default | Example |
Object | null | .targets(myObj)
|
CODE EXAMPLE
let logEl = $1('.battery-log');
let battery = {
charged: '0%',
cycles: 120
};
new TweenAnim({
keys: {
charged: '100%',
cycles: 130
},
round: 0,
on: {
updated: function () {
logEl.innerHTML = Jsons.stringify(battery);
}
}
}).targets(battery);