The Star node is a simple, versatile primitive shape used to render star elements on the canvas. Built on top of Konva’s Star, it supports customizable properties such as amount of points, position, inner and outer radius, fill color, stroke, radius (on both axis), and more.
They can also respond to interactions like dragging, resizing, or selection.
Usage
Import the Node
Start by importing the node:
import { WeaveStarNode } from "@inditextech/weave-sdk";
Register the Node
Then register the node on the Weave class instance.
const instance = new Weave({
...
nodes: [
...,
new WeaveStarNode(), (1)
]
})
| 1 | Added in this step. |