Weave.js

Stroke

Draw a free-line on the canvas

Stroke on Weave.js showcase

The Stroke node represents a customizable free-line on the canvas. It supports features like stroke color, width, dash patterns.

Usage

Import the Node

Start by importing the node:

import { WeaveStrokeNode } from "@inditextech/weave-sdk";

Register the Node

Then register the node on the Weave class instance.

const instance = new Weave({
  ...
  nodes: [
    ...,
    new WeaveStrokeNode(), 
  ]
})

Use the node

Once the node is registered you can use it on Actions or Plugins or even other Nodes.

We provide a single action:

  • Brush Tool that allows users to add free-line nodes.