Skip to content
pixi-silk
GitHub repository
Type

IconPainter

import type { IconPainter } from 'pixi-silk/ui/blocks';
type IconPainter = (g: SilkGraphics, cx: number, cy: number, size: number, t: number, color: number) => void;

Draws a button’s icon centred on (cx, cy), about size across. t goes from 0 to 1 as the button turns active.

Parameters#

ParameterType
gSilkGraphics
cxnumber
cynumber
sizenumber
tnumber
colornumber

Returns#

void