Add a node to the graph.
Side-effecting nodes (setAttribute, setVariable — anything with
kind.category === 'effect') are automatically appended to the graph's
execution-order list (statements); they have no value output, so this
is the only thing that makes them actually run. Pass statement: false
to opt out (rare — usually means "construct it now, wire it later").
Pass statement: true to force-add a non-effect node to the execution
order, which only makes sense for custom kinds you've added.
inputValues sets inline literals on input ports — used when a port
has no incoming edge. Same precedence as everywhere else: incoming
edge > inputValues > port.default.
Optionalid?: stringOptionalparams?: Record<string, unknown>OptionalinputValues?: Record<string, number | boolean | number[]>Optionalposition?: NodePositionOptionalstatement?: booleanOverride the automatic "effect-kinds run as statements" classification.
Set or update one inline input value on an existing node. Equivalent to
authoring inputValues: { port: value } at add() time, but composable.
Declare a local variable. The graph compiler hoists declarations to the
top of the block (matching ExpressionGraph.variables).
Snapshot the current builder state as an ExprNodeGraph.
Mutable builder for an
ExprNodeGraph. Each method returns the node (or port handle) so call sites can chainadd()/connect()calls without juggling raw ids.Typical usage: