interface INodeDefinition<I, O> {
    calculate?: CalculateFunction<NoInfer<I>, NoInfer<O>>;
    inputs?: InterfaceFactory<I>;
    onCreate?: ((this: Node<I, O>) => void);
    onDestroy?: ((this: Node<I, O>) => void);
    onPlaced?: ((this: Node<I, O>) => void);
    outputs?: InterfaceFactory<O>;
    title?: string;
    type: string;
}

Type Parameters

  • I
  • O

Properties

calculate?: CalculateFunction<NoInfer<I>, NoInfer<O>>

This function is called by the engine with the input values. It should perform the necessary calculation and then return the output values

Inputs of the node

onCreate?: ((this: Node<I, O>) => void)

Called as soon as an instance of the node is created but before it is placed into a graph

onDestroy?: ((this: Node<I, O>) => void)

Called after the node is removed from a graph. Can be used for cleanup

onPlaced?: ((this: Node<I, O>) => void)

Called when the node is placed into a graph

outputs?: InterfaceFactory<O>

Outputs of the node

title?: string

Default title when creating the node. If not specified, it is set to the nodeType

type: string

NodeType