Builtin Library
- ..
- .metadata17 B
- README.md1.8 KB
- anim.module
- builder.module
- code.module
- cooks.module
- demos.module
- device.module
- diskcache.module
- edit.module
- emit.module
- eval.module
- fieldc.module
- fields.module
- fusion.module
- geometry.module
- gpu.module
- graph.module
- hash.module
- init.luau115 KB
- kernel.module
- noise.module
- ops.module
- parity.module
- placement.module
- polyline.module
- preview.module
- raster.module
- records.module
- registry.module
- shaders
- stage.module
- substrate.module
- translate.module
- types.module
README.md
proc
Code-authored, graph-backed procedural generation for the Zero engine.
A graph is one function of g: proc.define(function(g) ... end). Nodes are called by
family and name (g.<family>.<name>({ ... })), inputs are declared with g:input(name, default, opts),
the returned table is the graph's outputs, and io.output is how the graph stands in the world.
builder.module/README.md holds every rule of that form.
This module owns the whole procedural model: the graph builder + data model,
the operation registry, the type system, the lazy cached evaluator, deterministic scoped hashing, and the node-family op
implementations. Authored .procGraph graphs are persisted via
procGraph.assetType; the procgen.preview / procgen.spawn operations live in
procgen.toolbox and are invoked as tools: tools.use("procgen", "preview", args)
from a script or an agent's tool_exec script, or zero procgen preview in the
shell. Generated
meshes/materials/textures/bundles are persisted through their own .assetType.
An op family can also come from outside this package: a .procPack asset
registers its ops in the same registry, called as g.op.<id>(...) exactly like the ones
shipped here (proc.registerPack(name, ops) is what it registers through, and
what a test or a tool calls to hold a family for the life of one VM).
terrain.* is one such pack, shipped in terrainSystem.package/procPacks/
and covering a whole landscape; guides { path = "systems/terrainSystem/documentation/terrain" } is its guide.
To find out what the registry holds, use the procgen toolbox: searchNodes
searches it and describeNode describes one node or op. proc.search_ops(query) and
proc.schema(id) are the same answers in-process, for a graph builder looking
something up while it runs.