Skip to content
pixi-silk
GitHub repository
Entry point

pixi-silk/ui/measure

Measure: size labels and red lines between objects.

import { Measure, redlines } from 'pixi-silk/ui/measure';

Classes#

ClassDescription
MeasureDistances and sizes for editors, drawn on an overlay.

Interfaces#

InterfaceDescription
MeasureOptionsOptions of Measure.
MeasureRectAn axis-aligned box in the measured space (MeasureOptions.space).
RedlineOne redline, in the measured space.

Type Aliases#

Type AliasDescription
MeasureTargetWhat Measure can measure: a box in the measured space, or a container. A container is read as the axis-aligned box around its transformed local bounds, every frame. A destroyed or detached container measures as nothing.

Functions#

FunctionDescription
redlinesThe redlines between two boxes given as edges (x0 < x1, y0 < y1). Separate boxes get the horizontal and vertical gaps, with a dashed guide when they do not overlap on the other axis. Overlapping or nested boxes get the distances between matching edges, zero-length ones left out. Pure: it allocates a new array and draws nothing.