Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

io.output (procNode)

Show a value in the world through the translation layer: a Geometry as a mesh, points that carry components (a Mesh, a Material, a light) as one entity each, the copies instances.to_points made as instanced draws (one per piece and material), primitives as entities with class "primitive", a Texture, Material, Raster or Part as what each is, and a Prefab as the entities its records describe. What the show makes hangs under the entity the graph stands on and goes with it. Answers a Handle that the runtime releases when the output goes away.

Elements that stand as entities stand as the hierarchy they state, as io.export writes it: an element whose name holds text names its entity, and one whose parent holds an element's id (what elements.link writes) hangs under that element's entity, placed in its space; an element with no parent hangs under the entity the graph stands on. A parent that names no element's id is refused.

An element whose Mesh holds a geometry with no triangles (a piece instances.pack made of points alone, or of nothing) stands as nothing: no mesh is made of it, the rest of the value stands, and the Handle's stats.drawn.empty counts the elements left out (proc.translate.drawn).

Built from the Luau node (io.luau) over show.module, which sits in this node's folder: its show function registers what the value needs and answers the Handle. A graph is pulled from its output nodes. What a show stands is spawned under the entity the graph stands on from the frame it stands. Shown during a present of a play, a show is prepared while the play cooks and stands, with every other show of that present, once the present's cooks are done; what it replaces goes in the same frame. The next show of an output reconciles onto the entities the last one stood under the same place: the entity the graph stands on, or for a graph on no entity the play that shows it (proc.eval.standingPlace).

g.io.output({ value = mesh })
g.io.output({ value = rocks, class = "point" })

Inputs

  • value (Value). The value to show: Geometry, Points, Part, Texture, Material, Field, Raster or Prefab.
  • class (String, default "", one of "", "point", "primitive"). What one element of a Geometry stands for in the world. Empty shows a geometry with primitives whole as one mesh and stands each point of a set of points that carries components as an entity and a marker at each point of a set that carries none; "point" or "primitive" stands each element of that class as its own.
  • layer (String, default ""). For a Raster, the layer drawn; empty draws height when the raster has it, else its first layer.
  • name (String, default "output"). The base name of the entities and assets the show makes. Two outputs of one graph take names of their own: a play refuses two that show under one name, and proc.validate reports them (OUTPUT_NAME_TAKEN).

Outputs

  • handle: the Handle of what was registered.