name | type | arguments | Default | description |
---|---|---|---|---|
from | number | <optional> | 0 |
The start number. |
to | number | <optional> | 1 |
The end number. |
delay | number | <optional> | 0 |
The number of milliseconds to delay before the counter will start. |
duration | number | <optional> | 1000 |
The duration of the counter in milliseconds. |
ease | string | function | <optional> | 'Power0' |
The easing equation to use for the counter. |
easeParams | array | <optional> |
Optional easing parameters. |
|
hold | number | <optional> | 0 |
The number of milliseconds to hold the counter for before yoyo'ing. |
repeat | number | <optional> | 0 |
The number of times to repeat the counter. |
repeatDelay | number | <optional> | 0 |
The number of milliseconds to pause before the counter will repeat. |
yoyo | boolean | <optional> | false |
Should the counter play forward to the end value and then backwards to the start? The reverse playback will also take |
completeDelay | string | number | function | object | array | <optional> | 0 |
The time the counter will wait before the onComplete event is dispatched once it has completed, in ms. |
loop | string | number | function | object | array | <optional> | 0 |
The number of times the counter will repeat. (A value of 1 means the counter will play twice, as it repeated once.) |
loopDelay | string | number | function | object | array | <optional> | 0 |
The time the counter will pause before starting either a yoyo or returning to the start for a repeat. |
paused | boolean | <optional> | false |
Does the counter start in a paused state (true) or playing (false)? |
callbackScope | any | <optional> |
Scope (this) for the callbacks. The default scope is the counter. |
|
onComplete | Phaser.Types.Tweens.TweenOnCompleteCallback | <optional> |
A function to call when the counter completes. |
|
onCompleteParams | array | <optional> |
Additional parameters to pass to |
|
onLoop | Phaser.Types.Tweens.TweenOnLoopCallback | <optional> |
A function to call each time the counter loops. |
|
onLoopParams | array | <optional> |
Additional parameters to pass to |
|
onRepeat | Phaser.Types.Tweens.TweenOnRepeatCallback | <optional> |
A function to call each time the counter repeats. |
|
onRepeatParams | array | <optional> |
Additional parameters to pass to |
|
onStart | Phaser.Types.Tweens.TweenOnStartCallback | <optional> |
A function to call when the counter starts. |
|
onStartParams | array | <optional> |
Additional parameters to pass to |
|
onStop | Phaser.Types.Tweens.TweenOnStopCallback | <optional> |
A function to call when the counter is stopped. |
|
onStopParams | array | <optional> |
Additional parameters to pass to |
|
onUpdate | Phaser.Types.Tweens.TweenOnUpdateCallback | <optional> |
A function to call each time the counter steps. |
|
onUpdateParams | array | <optional> |
Additional parameters to pass to |
|
onYoyo | Phaser.Types.Tweens.TweenOnYoyoCallback | <optional> |
A function to call each time the counter yoyos. |
|
onYoyoParams | array | <optional> |
Additional parameters to pass to |
|
onPause | Phaser.Types.Tweens.TweenOnPauseCallback | <optional> |
A function to call when the counter is paused. |
|
onPauseParams | array | <optional> |
Additional parameters to pass to |
|
onResume | Phaser.Types.Tweens.TweenOnResumeCallback | <optional> |
A function to call when the counter is resumed after being paused. |
|
onResumeParams | array | <optional> |
Additional parameters to pass to |
|
persist | boolean | <optional> |
Will the counter be automatically destroyed on completion, or retained for future playback? |
|
interpolation | string | function | <optional> |
The interpolation function to use if the |