Module field3D
Field3D: an object representing a 3D densely packed array.
Functions
field3D:set (value, x, y, z) | set the value of a cell, or of all cells. |
Functions
- field3D:set (value, x, y, z)
-
set the value of a cell, or of all cells.
If the x,y,z coordinate is not specified, it will apply the value for all cells.
If the value to set is a function, this function is called (passing the x, y, z coordinates as arguments). If the function returns a value, the cell is set to this value; otherwise the cell is left unchanged.
Parameters:
- value number or function to set
- x optional int coordinate (row) to set a single cell
- y optional int coordinate (column) to set a single cell
- z optional int coordinate (layer) to set a single cell