Builtin Library
- ..
- .metadata306 B
- README.md1.3 KB
- ids.module
- init.luau2.6 KB
README.md
attribute.set
Set a named attribute on a class of a geometry (point, vertex, edge, primitive, detail). The value is a field or column with one entry per element, or one number, vector or record every element takes. A copy carrying the column comes out.
Inputs
geometry: What the column is written on. A copy carrying it comes out.class(one of: detail, edge, point, primitive, vertex): Which rows the column has one value for: point, vertex (one per triangle corner), edge, primitive (one per triangle) or detail (one value for the whole geometry).name: What the column is called. Writing a name the class already carries replaces that column.countis the class's element count and no column's name: a column namedcountis refused.value: The column's values: a field or column evaluated per element, or one value every element takes. A record is stored as it stands, which is how an element carries a component.ids(Bool, default false). On, the column holds theidof a point of this geometry in each element (-1 for none): a reference to another element. A join of geometries then moves its values with the ids they name, and a selection sets a value that names a removed point to -1. Only a point column can hold ids.
Outputs
geometry: the copy carrying the column.