Skip to content
pixi-silk
GitHub repository
Interface

CounterBlockOptions

import type { CounterBlockOptions } from 'pixi-silk/ui/blocks';

Options of a CounterBlock.

Extends#

Properties#

PropertyTypeDescriptionInherited fromDefined 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?booleanWhether 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) => stringTurns the shown number into text. Default String(Math.round(n)).-packages/pixi-silk/src/ui/blocks.ts:732
height?numberHeight. Default 0 (set by the layout through onSize).BlockOptions.heightpackages/pixi-silk/src/ui/blocks.ts:42
layer?BlockLayerWhich 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.layerpackages/pixi-silk/src/ui/blocks.ts:49
seconds?numberSeconds a rise takes to count up. Default 0.8. 0 jumps.-packages/pixi-silk/src/ui/blocks.ts:734
style?DrawTextStyleFont and layout. tabularNumbers is on unless you turn it off, so digits do not jitter.-packages/pixi-silk/src/ui/blocks.ts:738
valueReadSignal<number>The number to show. Integers count without drift: hold money in minor units.-packages/pixi-silk/src/ui/blocks.ts:730
width?numberWidth. Default 0 (set by the layout through onSize).BlockOptions.widthpackages/pixi-silk/src/ui/blocks.ts:40