Skip to content

pencil.js / path / InstructionCallback

Type Alias: InstructionCallback ​

ts
type InstructionCallback = (path, target, previousPosition, ...args) => void;

Defined in: path.ts:15

Function executed by an instruction

Parameters ​

ParameterTypeDescription
pathPath2DCurrent drawing path
targetPositionTarget position
previousPositionPositionPosition from where instruction started
...argsnever[]Additional arguments of the instruction

Returns ​

void

Released under the MIT License.