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

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

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

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

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

Called when the node is placed into a graph

onUpdate: ((inputs: I, outputs: O) => 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.

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