Skip to content
pixi-silk
GitHub repository
Entry point

pixi-silk/ui/outline

SelectionOutline: hover and selection outlines.

import { SelectionOutline, boundsQuad, padQuad, scaleQuad } from 'pixi-silk/ui/outline';

Classes#

ClassDescription
SelectionOutlineAnimated bounds around one or more objects, for hover and selection in editors.

Interfaces#

InterfaceDescription
OutlineStateThe reactive state of a SelectionOutline.
SelectionOutlineOptionsOptions of SelectionOutline.

Type Aliases#

Type AliasDescription
OutlineModeHow an outline looks: a quiet hover line or an accented selected frame.
QuadFour corners of a box, clockwise from top left, in the outline’s space.

Functions#

FunctionDescription
boundsQuadCorners of target’s local bounds, mapped into space. Rotated objects give a rotated box. Measures the bounds on each call.
padQuadPushes every side of a quad outwards by pad, along the quad’s own axes. A negative pad shrinks it.
scaleQuadScales a quad about its centre by k. Returns the same quad when k is 1, a new one otherwise.
unionQuadAxis-aligned box around several quads. An empty list gives an infinite, inverted box.