Guides: draggable guide lines from the rulers.
import { Guides, snapValue } from 'pixi-silk/ui/guides';
Classes#
| Class | Description |
|---|
| Guides | Guide lines over a Camera’s world. Drag a guide out of a Ruler: the top ruler gives a horizontal one, the left a vertical one. Drag a guide to move it, drop it back on the ruler to remove it. A pill shows the position while dragging. Guides.bindSnap feeds the guides to a snap engine, so objects snap to them. |
Interfaces#
| Interface | Description |
|---|
| Guide | A guide line. Guide objects are replaced, not mutated, when a guide moves. |
| GuideDrag | A guide being dragged: where it is now, and whether letting go here removes it. |
| GuidesOptions | Options of Guides. |
| GuidesState | The reactive state of a Guides layer. |
Type Aliases#
| Type Alias | Description |
|---|
| GuideSnap | 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. |
Functions#
| Function | Description |
|---|
| snapValue | The value of candidates within threshold of v that is nearest, or v when none is. A tie keeps the first. |