gapsBetween
import { gapsBetween } from 'pixi-silk/ui/spacing';
function gapsBetween(rects: readonly SnapRect[], axis: "x" | "y"): GapMarker[];
The gaps between consecutive rectangles along an axis, sorted by position, for rows and columns. Overlapping or touching neighbours have no gap. Use it to show the spacing of an auto-layout container’s children. It does not check that the rectangles share a row.
Parameters#
| Parameter | Type |
|---|---|
rects | readonly SnapRect[] |
axis | "x" | "y" |