Skip to content
pixi-silk
GitHub repository
Entry point

pixi-silk/ui

Every widget and editor tool in one import. The per-widget subpaths ship less code.

import { SilkButton, TransformGizmo, Camera } from 'pixi-silk/ui';

Classes#

ClassDescription
DriverRuns a widget’s animation step on a ticker only while something moves. step returns true while it still has work. Once it returns false the driver leaves the ticker, so idle widgets cost nothing per frame.

Interfaces#

InterfaceDescription
InputProfileHow forgiving a widget is for one kind of pointer. Fingers are fat and shaky, mice are precise: the same menu gets a bigger dead zone, a longer falloff and larger targets under a finger. Distances are in screen pixels.

Type Aliases#

Type AliasDescription
IconSourceAnything that can sit in a widget slot: - a string: drawn as text (a word, a glyph, an emoji), - a texture: drawn as a sprite fitted to the slot, - a container: used as is, - a function: draws a vector icon with pixi-silk, centred on (0, 0), size wide, in white.
InputKindKind of pointer driving a widget.
InputProfilesPer-kind overrides of INPUT_PROFILES.

References#

zoomLabel#

Re-exports zoomLabel