Skip to content
pixi-silk
GitHub repository
Features

Interface

Buttons, radial menus, responsive layout, hit testing and motion for canvas interfaces.

View as Markdown

Ready-made widgets for canvas interfaces, each under its own pixi-silk/ui entry point.

Layout places them on portrait and landscape screens. Interaction and motion cover hit testing, springs and the odometer.

Questions

Do pointer events work on SilkGraphics?

Yes. Set eventMode = 'static' and listen as usual. Hit tests use the real shapes, so a stroked circle is hollow and a line reacts only within its stroke width.

Why does my SmartContainer not move or scale?

It needs a viewport: pass the Pixi Application, a signal or a rectangle as viewport or call setViewport(). Without one it has no window to place itself in.

How close is the layout engine to CSS flexbox?

It follows flexbox for direction, wrap, grow, shrink, gaps and alignment. It has no order, overflow or borders, and an item's default minimum size is 0, not its content size.

How do I animate a counter or a balance?

Use Odometer from pixi-silk/ui/odometer. set(value) rolls each digit column to the new value, and skip() jumps to the end.

All questions