var t = new MVC.Timer({
time: 1000,
from: 1,
to: -1,
interval: 5,
onUpdate : function(value){ ... }
onComplete : function(value){ ... }
easing: "linear"
})
t.start();new MVC.Timer(options) -> mvc.timer
{Object} -
| Option | Default | Description |
|---|---|---|
| time | 500 | Time the timer runs in ms. |
| from | 0 | The starting value of the timer |
| to | 1 | The end value of the timer. |
| interval | 1 | Millisecond time between calls. |
| onUpdate | Called each time a new value is ready. | |
| onComplete | Called when the timer is complete. | |
| easing | "swing" | The name of an easing or easing function. |
start() -> undefined
kill() -> undefined