CounterBlockOptions
import type { CounterBlockOptions } from 'pixi-silk/ui/blocks';
Options of a CounterBlock.
Extends#
Properties#
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
align? | readonly [number, number] | Where the text sits in the slot. Default [0, 0.5]. | - | packages/pixi-silk/src/ui/blocks.ts:742 |
countDown? | boolean | Whether a drop counts down too. Default false: a drop (a bet taken) jumps. | - | packages/pixi-silk/src/ui/blocks.ts:736 |
fill? | Value<FillInput> | Paint of the digits. Default white. | - | packages/pixi-silk/src/ui/blocks.ts:740 |
format? | (n: number) => string | Turns the shown number into text. Default String(Math.round(n)). | - | packages/pixi-silk/src/ui/blocks.ts:732 |
height? | number | Height. Default 0 (set by the layout through onSize). | BlockOptions.height | packages/pixi-silk/src/ui/blocks.ts:42 |
layer? | BlockLayer | Which layer of the surface paints the block. 'auto' (default) starts in the cached still layer and moves to the live layer the first time the block animates or changes. 'still' stays in the still layer: a change repaints and re-caches that layer, and the block keeps its place under live blocks. 'live' starts in the live layer. | BlockOptions.layer | packages/pixi-silk/src/ui/blocks.ts:49 |
seconds? | number | Seconds a rise takes to count up. Default 0.8. 0 jumps. | - | packages/pixi-silk/src/ui/blocks.ts:734 |
style? | DrawTextStyle | Font and layout. tabularNumbers is on unless you turn it off, so digits do not jitter. | - | packages/pixi-silk/src/ui/blocks.ts:738 |
value | ReadSignal<number> | The number to show. Integers count without drift: hold money in minor units. | - | packages/pixi-silk/src/ui/blocks.ts:730 |
width? | number | Width. Default 0 (set by the layout through onSize). | BlockOptions.width | packages/pixi-silk/src/ui/blocks.ts:40 |