createCombinedNode

fun <A> createCombinedNode(parentNodes: List<Node<Any?>>, combine: (List<Any?>) -> A, onNextFrame: (Node<A>) -> Unit? = null): Node<A>(source)

Creates a node that updates whenever any of its parentNodes updates.

Parameters

parentNodes

The list of nodes used as inputs to the combined node.

combine

Function that acts on the value of its parent nodes to produce the recomputed value of the combined node.

onNextFrame

Optional action to perform after the node's value has been updated (typically only used for events, to reset to EventState.None on the next frame).