Skip to content
pixi-silk
GitHub repository
Function

recordGizmo

import { recordGizmo } from 'pixi-silk/history';
function recordGizmo<T extends TransformTarget>(
   gizmo: RecordableGizmo<T>, 
   history: HistoryLike, 
   options?: RecordGizmoOptions<T>
): () => void;

Records every drag of a transform gizmo as one undoable step. The gizmo knows nothing about history: this watches its dragging signal. Returns the function that stops recording.

Type Parameters#

Type Parameter
T extends TransformTarget

Parameters#

ParameterType
gizmoRecordableGizmo<T>
historyHistoryLike
optionsRecordGizmoOptions<T>

Returns#

() => void