Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

procgen.toolbox shared

Cross-tool helpers for the procgen toolbox, required by its tools as require(".shared") (and from elsewhere as @builtin::systems.procgen.procgen.shared). Tools return their raw values (the tool.assetType wrapper packages them into the system ZmToolResult envelope, { ok, value | error }) and raise via error(message) on failure.

What it holds, by the tools that share it:

  • Graphs and nodes: resolveGraph (a graph by VFS path, asset name or graph object), graphName, resolveTarget (a target string, defaulting to the first declared output, else the output shown), shownRefs (the value each io.output call of a graph holds) and graphFor (the graph to evaluate for a target: a graph that declares no output also declares shown, the value its first io.output shows), sourceFolder and writeCode (the folder of the code an edit tool changes, and writing it once it builds, with what proc.validate says of it), nodeEntries and placeOf (every node a graph can call, with its family and the name a graph calls it by), and cookCheck (a call-form graph's first frame cooked in a cache of its own, answering what the cook refused and the nodes that run on the CPU every frame).
  • Pictures of values: previewName and renderValue (a value visualized, captured and cleaned up), and renderGenerated (an output pictured as a temporary generator draws it at the graph's still).
  • Live generators: resolveEntity, generatorProxy and subject (an entity carrying a Generator, refused when it carries none), pictureOptions (the picture options checked by name), pictureAt and picturesPlayedTo (a picture of the frame a generator presents for a graph time), pictureOfPresent and holdPresent (what a procgen.onPresent probe runs on a hit), clockState and restoreClock (the clock a picture moves, put back), and the present waits under them.