interface INodeDefinition<I, O> {
    calculate?: CalculateFunction<NoInfer<I>, NoInfer<O>>;
    inputs?: InterfaceFactory<I>;
    onCreate?: ((this) => void);
    onDestroy?: ((this) => void);
    onPlaced?: ((this) => 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) => void)

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

Type declaration

    • (this): void
    • Parameters

      Returns void

onDestroy?: ((this) => void)

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

Type declaration

    • (this): void
    • Parameters

      Returns void

onPlaced?: ((this) => void)

Called when the node is placed into a graph

Type declaration

    • (this): void
    • Parameters

      Returns void

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