interface IDynamicNodeDefinition<I, O> {
    calculate?: CalculateFunction<Dynamic<I>, Dynamic<O>>;
    inputs?: InterfaceFactory<I>;
    onCreate?: ((this) => void);
    onDestroy?: ((this) => void);
    onPlaced?: ((this) => void);
    onUpdate: ((inputs, outputs) => DynamicNodeUpdateResult);
    outputs?: InterfaceFactory<O>;
    title?: string;
    type: string;
}

Type Parameters

  • I
  • O

Properties

calculate?: CalculateFunction<Dynamic<I>, Dynamic<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

onDestroy?: ((this) => void)

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

Type declaration

onPlaced?: ((this) => void)

Called when the node is placed into a graph

Type declaration

onUpdate: ((inputs, outputs) => DynamicNodeUpdateResult)

This function is called whenever the value of one of the static input or output interfaces is changed. It should return a definition for every dynamic interface based on the values of the static interfaces.

Type declaration

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