Function: generateSubstitution()
ts
function generateSubstitution(
rule,
size,
ctx,
label,
idPrefix?
): RawTile[];Subdivide rule's seed until the final tiles have edge size, keeping only pieces near the region, and assemble them. ctx.origin places the center of the seed patch; ctx.rotation turns the whole pattern.
Parameters
| Parameter | Type | Default value |
|---|---|---|
rule | SubstitutionRule | undefined |
size | number | undefined |
ctx | GenerateContext | undefined |
label | string | undefined |
idPrefix | string | "s" |
Returns
RawTile[]