Methods
counter(_checkopt, _minopt, _maxopt, _changeopt, _currentopt, _modeopt) → {number|Object}
Configurable counting number function, see `Tween.count` for the function that return this function
Example
let counter = Tween.count(0, 10, 1, 0, 0);
counter();
//0
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
_check |
boolean |
<optional> |
`true` if you want the function to return internal object, else just number |
_min |
number |
<optional> |
|
_max |
number |
<optional> |
|
_change |
number |
<optional> |
|
_current |
number |
<optional> |
current start number (not minimum) |
_mode |
number |
<optional> |
there are different modes from 0 to 5, you can test it yourself (recommended to use 1 and 3) |
Returns:
Internal object: `{min: number, max: number, change: number, next: number, current: number, mode: number}`
- Type
- number | Object