OdometerOptions
import type { OdometerOptions } from 'pixi-silk/ui/odometer';
Options of Odometer.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
color? | string | number | Text colour. Default white. | ui/odometer.ts:70 |
decimals? | number | Digits after the decimal point, 0 to 8. Default 0. | ui/odometer.ts:56 |
duration? | number | Count-up time in seconds for a small change. Default 0.9. | ui/odometer.ts:74 |
easing? | (t: number) => number | Easing of the count. Default outCubic. | ui/odometer.ts:78 |
fontSize? | number | Font size in px. Default 32, bold system font. | ui/odometer.ts:68 |
minDigits? | number | Minimum number of whole digits, padded with zeros. Default 1. | ui/odometer.ts:66 |
onDone? | (value: number) => void | The count reached its target. Called with the target value. | ui/odometer.ts:82 |
point? | string | Decimal mark. Default .. | ui/odometer.ts:64 |
prefix? | string | Text before the number, such as a currency sign. | ui/odometer.ts:58 |
speedUp? | boolean | Bigger jumps count for longer (up to 3x). Default true. | ui/odometer.ts:76 |
suffix? | string | Text after the number. | ui/odometer.ts:60 |
textStyle? | TextStyleOptions | Pixi text style merged over the default. It builds a bitmap font, so set it once. | ui/odometer.ts:72 |
thousands? | string | Thousands separator, '' for none. Default ,. | ui/odometer.ts:62 |
ticker? | Ticker | null | Ticker that runs the count. Default Ticker.shared. With null, call Odometer.tick yourself. | ui/odometer.ts:80 |
value? | number | Start value. Default 0. | ui/odometer.ts:54 |