Builtin Library
README.md
value
Single values a graph computes with. A measurement turns into something a loop stops on, a count another node takes, or anything a switch decides.
procgen.searchNodes("", { pack = "value" }) lists the family and procgen.describeNode("op.<id>")
describes any one of them.
Ops
value.get— one field of a Data or record value, by a dotted path such asbounds.max.y. When the path misses, the error names the fields that are there.value.math—a <op> bfor add, sub, mul, div, min, max or pow.bis a wire or theconstantparam.value.expr— a number that follows an expression over the graph's time (t,frame, the math functions) and the namesvariablesgives it, each a constant, a graph input or another node's number. A curve that depends on graph inputs is this one node:{ variables = { peak = peak, decay = decay } }withexpression = "peak * max(0, 1 - t / decay) ^ 2".value.compare—a <op> bfor less, less_equal, greater, greater_equal, equal or not_equal, answering a Bool.value.switch:ifTruewhenwhenis true,ifFalseotherwise. Only the one taken is cooked.value.present: whether anything is wired intovalue, as a Bool: what a graph used as a node asks of an input its caller may leave unwired.value.fallback: the value wired intovalue, orfallbackwhen nothing is.fallbackis cooked only when it is the one taken.
local stats = g.op.geometry.measure({ geometry = grown })
local top = g.op.value.get({ data = stats, path = "bounds.max.y" })
local done = g.op.value.compare({ a = top, op = "greater_equal", constant = 3 })