Skip to content

Function: contentSlots() ​

ts
function contentSlots(
   layout, 
   count, 
   options?
): number[];

Assign count content items to cells. Featured cells (see LayoutOptions.features) take the items their features name (Feature.item), or else the first items, in feature order; the rest follow placement, in item order and reading order. Returns one entry per cell (by cell.index): the index of the item it holds, or -1 for an empty cell. Pass Infinity to number every cell that may hold content.

Parameters ​

ParameterType
layoutLayout
countnumber
optionsContentOptions

Returns ​

number[]

Hat tiling and isohedral tilings after Craig S. Kaplan's hatviz and Tactile (BSD 3-Clause).