Overview
The WeaveBrushToolAction class that enables users to draw freeform strokes on the canvas using a brush tool. It lets users click and drag across the canvas to create a smooth, continuous path—perfect for sketching, annotating, or freehand drawing within a collaborative environment.
Each stroke is recorded as a WeaveLineNode, synchronized across all connected users in real time.
The class extends the WeaveAction class.
TypeScript types
type WeaveBrushToolActionProperties = {
interpolationSteps: number; // Number of steps for interpolation
};
type WeaveBrushToolActionParams = {
config: Partial<WeaveBrushToolActionProperties>;
};
Parameters
For WeaveBrushToolActionParams:
| Property | Type | Required | Description |
|---|---|---|---|
|
|
Required |
Config parameters for the tool. |
For WeaveBrushToolActionParams:
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
|
|
|
Number of interpolation steps for smooth curve on touch devices. |