Getting Started

Installation

NPM

npm i flow-connect

CDN

<script src="https://cdn.jsdelivr.net/npm/flow-connect@latest/dist/flow-connect.js"></script>

Usage

ESM

Note: Seperate dependency required for '@flow-connect/*' packages, check flow-connect-standard-nodesopen in new window monorepo for further details.


import { FlowConnect, Vector } from "flow-connect";
import * from "@flow-connect/common";

Example

const flowConnect = new FlowConnect(canvasElement);

const flow = flowConnect.createFlow({ name: "New Flow" });

const timer = flow.createNode("common/timer", Vector.create(50, 50), {
  state: { delay: 500 },
});
const log = flow.createNode("common/log", Vector.create(250, 100), {});

timer.outputs[0].connect(log.inputs[0]);

this.flowConnect.render(flow);
flow.start();