TransformGizmoOptions
import type { TransformGizmoOptions } from 'pixi-silk/ui/gizmo';
Options of TransformGizmo.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
apply? | boolean | Write the new transform into the target. Default true. Set false to apply it yourself in onChange. | ui/gizmo.ts:128 |
mode? | GizmoMode | Tools shown at first. Default universal. | ui/gizmo.ts:106 |
onChange? | (transform: GizmoTransform, handle: GizmoHandle) => void | Every drag step, with the new transform. Called whether or not apply writes it. | ui/gizmo.ts:138 |
onEnd? | (transform: GizmoTransform, handle: GizmoHandle) => void | A drag ended, also when attach moves to another target mid-drag. | ui/gizmo.ts:140 |
onStart? | (handle: GizmoHandle, transform: GizmoTransform) => void | A drag started. transform is the target’s transform before it. | ui/gizmo.ts:136 |
profiles? | Partial<Record<InputKind, Partial<InputProfile>>> | Per pointer kind overrides of the hit tolerance and handle size. | ui/gizmo.ts:132 |
readout? | boolean | Show a value pill (angle, size, offset) while dragging. Default true. | ui/gizmo.ts:120 |
size? | number | Length of the axis handles, in gizmo units. Default 84. Grows for touch. | ui/gizmo.ts:112 |
snap? | GizmoSnap | Initial snap steps. Later changes go to TransformGizmo.snap. | ui/gizmo.ts:114 |
snapEngine? | SnapEngine | Smart guides for free moves: aligns the target’s bounds with other objects. Ctrl or Cmd turns them off. | ui/gizmo.ts:116 |
snapGuides? | SnapGuides | Draws what snapEngine found. Put it in the target’s parent space. | ui/gizmo.ts:118 |
space? | GizmoSpace | Axes of the move handles at first. Default local. Scale handles always follow the object’s own axes. | ui/gizmo.ts:108 |
target? | Container<ContainerChild> | null | Object to transform. It can sit in another container than the gizmo, which follows it on screen. | ui/gizmo.ts:110 |
theme? | Partial<GizmoTheme> | Colours merged over GIZMO_THEME. Read once, at construction. | ui/gizmo.ts:130 |
ticker? | Ticker | null | Ticker that runs the animation and follows the target. Default Ticker.shared. With null, call TransformGizmo.tick yourself. | ui/gizmo.ts:134 |
transition? | "pop" | "glide" | What happens when the gizmo moves to another object. pop (default): the old handles shrink away where they were, the new ones spring in group by group, and input waits until they land. glide: the handles slide over. Following the same object is always exact. | ui/gizmo.ts:126 |