Skip to content
pixi-silk
GitHub repository
Interface

SnapGuide

import type { SnapGuide } from 'pixi-silk/ui/snap';

A line the snap engine found, ready to draw, in the snapping space.

Properties#

PropertyTypeDescriptionDefined in
atnumberPosition of the line on its axis. For spacing guides, where the gap markers sit across the axis.ui/snap.ts:27
axis"x" | "y"x is a vertical line at x = at, y a horizontal line at y = at.ui/snap.ts:23
fromnumberStart of the line along the other axis.ui/snap.ts:29
gap?numberSpacing guides only: the gap size.ui/snap.ts:35
gaps?[number, number][]Spacing guides only: the equal gaps, as [start, end] on axis, drawn at at on the other axis.ui/snap.ts:33
kind"line" | "edge" | "centre" | "spacing"What lined up: target edges, target centres, a fixed guide line, or an equal gap.ui/snap.ts:25
tonumberEnd of the line along the other axis.ui/snap.ts:31