GuideSnap
import type { GuideSnap } from 'pixi-silk/ui/guides';
type GuideSnap = (axis: "x" | "y", at: number, threshold: number) => number;
Snaps a guide while it is dragged. Gets the raw position and the snap distance, both in world
units, and returns where the guide should go. Return at unchanged to let rounding apply.
Parameters#
| Parameter | Type |
|---|---|
axis | "x" | "y" |
at | number |
threshold | number |
Returns#
number