Builtin Library
README.md
procgen.frames
Pictures of a live generator at moments of its graph time, in one call: how an effect goes from moment to moment. For each time, the generator's clock is stopped, its playhead moved to the frame that stands for that time, and the picture taken once the generator has presented that frame, of what it draws alone, framed to fit, over the grey backdrop and light of the studio an asset preview is photographed in, so an effect pictures the same in every world. The clock goes back where it stood afterwards, running again if it was running.
entitynames the generator, by entity id or name.timeslists graph times in seconds. Without it,counttimes (default 6) run evenly fromfromtoto, which default to the first and last frame of the generator's timeline. At most 16 pictures a call.widthandheightsize each picture (default 768 by 432);angleis{ yaw, pitch }in degrees around what is drawn (default{ 0, 20 });marginloosens the fit (default 1.15);backdropis"studio"(the grey, the default) or"dark"(near black, over which a glow, a spark or any additive surface reads at its full brightness).
A timeline with no end is a simulation of everything before a time, so it is
played to each time rather than moved there: its clock begins again at 0, each
picture is of the first frame presented at or past its time (the entry's time
says which), and it needs to or times.
A time outside a timeline with an end shows the frame at the end it is past,
and its entry carries a note saying so. A picture carries a note of its own
when the generator draws nothing on the frame, and when what it draws changes
no pixel of the backdrop. A generator whose cook failed raises, naming the node
that failed and why.
tools.use("procgen", "frames", { entity = "Grow", times = { 0.5, 1, 9 } })
Part of procgen.toolbox, called as tools.use("procgen", "frames", ...) (zero procgen frames in the engine shell). Returns { generator, graph, fps, frames }: one { time, frame, how, outputs, picture, note? } per
time asked for, in order. outputs holds each output's element count by name:
the elements its draw holds slots for, which for a population whose live count
is held on the device is its capacity (the picture shows the particles alive).