Skip to content

Interface: GenerateContext ​

Properties ​

maxTiles ​

ts
maxTiles: number;

Safety cap on the number of tiles generated.


origin ​

ts
origin: Vec;

Where the pattern's local origin sits.


outline? ​

ts
optional outline?: Polygon[];

The exact area to tile (outline and holes, less margin), for generators that follow it.


region ​

ts
region: Polygon;

Area that must be covered.


rotation ​

ts
rotation: number;

Pattern rotation in degrees.


sizeAt? ​

ts
optional sizeAt?: (p) => number;

For generators that can vary their tile size smoothly (Voronoi, Delaunay): the size wanted at a point, as a factor (at most 1) of the spec's size.

Parameters ​

ParameterType
pVec

Returns ​

number


unit? ​

ts
optional unit?: number;

Layout units per generator unit (the pattern scale), for specs given in layout units.

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