SnapEngineOptions
import type { SnapEngineOptions } from 'pixi-silk/ui/snap';
Options of SnapEngine. Each one sets the engine property of the same name.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
centres? | boolean | Uses target centres as snap anchors. Default true. | ui/snap.ts:59 |
edges? | boolean | Uses target edges as snap anchors. Default true. | ui/snap.ts:57 |
lines? | { x?: number[]; y?: number[]; } | Fixed guide lines: vertical lines at x, horizontal lines at y. The moving edges and centre snap to them. | ui/snap.ts:65 |
lines.x? | number[] | - | ui/snap.ts:65 |
lines.y? | number[] | - | ui/snap.ts:65 |
points? | { x: number; y: number; }[] | Points, used like zero-size targets. | ui/snap.ts:67 |
spacing? | boolean | Snaps to an equal gap between neighbours that overlap on the other axis. Default true. | ui/snap.ts:61 |
targets? | SnapRect[] | Rectangles to snap against (other objects). Default none. The array is kept, not copied. | ui/snap.ts:63 |
threshold? | number | Distance within which things snap, in the snapping space’s units. Default 6. Divide by the zoom for screen pixels. | ui/snap.ts:55 |