PathGizmoOptions
import type { PathGizmoOptions } from 'pixi-silk/ui/pathgizmo';
Options of PathGizmo.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
history? | HistoryLike | Records every edit as one undoable step. Any HistoryLike works, such as History. | ui/pathgizmo.ts:282 |
keys? | boolean | Delete, Backspace, Escape, Enter and the arrow keys, read on window while the gizmo is on stage and visible. Keys aimed at a text field are left alone. Default true. | ui/pathgizmo.ts:289 |
onChange? | (path: BezierPath) => void | Called on every change of the path, drags included. | ui/pathgizmo.ts:299 |
onCommit? | (path: BezierPath, label: string) => void | Called once per finished edit, with its label. | ui/pathgizmo.ts:301 |
outline? | boolean | Draw the path’s outline. Default true. | ui/pathgizmo.ts:291 |
path? | BezierPath | The path to edit. Default empty, ready for the pen. | ui/pathgizmo.ts:276 |
profiles? | Partial<Record<InputKind, Partial<InputProfile>>> | Per pointer kind overrides of hit sizes and the drag threshold. Touch gets larger targets. | ui/pathgizmo.ts:295 |
snap? | (p: Vec, info: PathSnapInfo) => Vec | Moves a dragged point, in path coordinates, such as onto a grid or a SnapEngine point. | ui/pathgizmo.ts:284 |
space? | Container<ContainerChild> | The space the path’s coordinates are in, such as a camera’s world. Default the gizmo’s parent. | ui/pathgizmo.ts:278 |
theme? | Partial<PathGizmoTheme> | Colours that replace parts of PATH_GIZMO_THEME. | ui/pathgizmo.ts:293 |
ticker? | Ticker | null | Ticker driving the animation. Default Ticker.shared. null for manual PathGizmo.tick. | ui/pathgizmo.ts:297 |
tool? | PathTool | Starting tool. Default edit. | ui/pathgizmo.ts:280 |