Interface: SubstitutionRule
Properties
coverRadius
ts
coverRadius: number;Radius of a disc around the origin that the seed patch fully covers, at scale 1.
edge
ts
edge: number;Edge length of the final tiles at scale 1, before any subdivision.
factor
ts
factor: number;Each subdivision shrinks pieces by this factor.
period?
ts
optional period?: number;The seed patch reproduces itself (scaled) every period subdivisions. Step counts are rounded up to a multiple of it, so a larger region shows more of the same pattern instead of a different one. Defaults to 1.
seed
ts
seed: Omit<Piece, "path">[];Pieces at scale 1, centerd on the origin.
Methods
assemble()
ts
assemble(pieces, tolerance): RawTile[];Turn the final pieces into tiles (e.g. join half-tiles into whole ones).
Parameters
| Parameter | Type |
|---|---|
pieces | Piece[] |
tolerance | number |
Returns
RawTile[]
subdivide()
ts
subdivide(piece): Omit<Piece, "path">[];Children of one piece, in the same coordinate frame.
Parameters
| Parameter | Type |
|---|---|
piece | Piece |
Returns
Omit<Piece, "path">[]