Skip to content

Interface: Feature ​

A featured tile: tiles neighboring tiles merged into one cell. The group grows from a tile near at, adding whichever neighbor keeps it most compact (so 4 grid tiles make a 2 × 2 square, 7 hexagons a flower); several starting tiles are tried and the most compact group kept, near at and avoiding tiles the region edge cuts. Features don't share tiles: a later one grows among the tiles still free.

Properties ​

at? ​

ts
optional at?: Vec;

Where the group starts, in region units. Defaults to the middle of the region.


ids? ​

ts
optional ids?: string[];

Exact tile ids to merge instead (from a layout without features; ids are stable). Overrides tiles and at. Tiles that aren't in the layout or are already taken are skipped.


item? ​

ts
optional item?: number;

Which content item (by position) goes in this featured cell. By default featured cells take the first items, in features order. See weightedLayout.


tiles? ​

ts
optional tiles?: number;

How many tiles to merge. Defaults to 4. Fewer are merged if the group runs out of room.

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