Skip to content
pixi-silk
GitHub repository
Interface

PathGizmoOptions

import type { PathGizmoOptions } from 'pixi-silk/ui/pathgizmo';

Options of PathGizmo.

Properties#

PropertyTypeDescriptionDefined in
history?HistoryLikeRecords every edit as one undoable step. Any HistoryLike works, such as History.ui/pathgizmo.ts:282
keys?booleanDelete, 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) => voidCalled on every change of the path, drags included.ui/pathgizmo.ts:299
onCommit?(path: BezierPath, label: string) => voidCalled once per finished edit, with its label.ui/pathgizmo.ts:301
outline?booleanDraw the path’s outline. Default true.ui/pathgizmo.ts:291
path?BezierPathThe 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) => VecMoves 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 | nullTicker driving the animation. Default Ticker.shared. null for manual PathGizmo.tick.ui/pathgizmo.ts:297
tool?PathToolStarting tool. Default edit.ui/pathgizmo.ts:280