weasel API - v0.8.0
    Preparing search index...

    Function usePenTool

    • Active-slot Tool: click + drag to build a PolygonPath Illustrator-style.

      State machine: Idle / Drawing / BetweenSubpaths (see design doc). Click places a corner anchor; click-drag places an anchor with an outgoing bezier handle; click-the-first-anchor closes the subpath; Enter open-finishes; Esc discards; tool-switch commits if ≥2 anchors else discards. Shift constrains the placement-drag handle to 0/45/90/135°; Alt during drag breaks the handle mirror for the next segment.

      Reshaping an existing path is not this tool's job — see PenScratch.

      Type Parameters

      • TPose

      Parameters

      Returns Tool<PenScratch>

    Index

    Properties

    Properties

    prefs: {
        children: {
            autoCommitOnClose: {
                default: true;
                description: string;
                kind: "boolean";
                name: string;
            };
        };
        description: string;
        name: string;
    }