ParaShape

ExpressionNode

Source: packages/parametric/src/nodes/ExpressionNode.ts

Properties

NameTypeDescription
expressionstringThe raw JS expression string that this node evaluates.
ownerNodes{ evaluate: () => void; } | undefinedThe owning node collection (the ModelScope's nodes), or undefined when this expression isn't mounted under an owner yet. UI uses this only to re-evaluate the graph after an edit (see requestEvaluate).

Methods

SignatureDescription
setInput(expr: string): voidUpdate the expression string and propagate dirty flags to all dependents.
buildContext(): EvalContextPublic eval scope for this expression (the same scope compute() uses).
requestEvaluate(): voidRe-evaluate the whole owning graph. Called by the UI after it writes a new expression (field blur / array row edit) so dependent nodes + geometry refresh. No-op when not yet mounted under an owner.