One family in a HatchParams. A family represents an infinite repeating pattern primitive — by default parallel lines, but also dots, wavy lines, or a brick lattice depending on type.

Length-valued fields (spacing, lineWidth, phase, amplitude, wavelength, brickHeight, courseOffset) are all measured in the units indicated by the parent HatchParams.space — pixels for "screen" (default), world units for "world" and "tangent".

interface HatchFamily {
    amplitude?: number;
    angle: number;
    brickHeight?: number;
    courseOffset?: number;
    lineWidth: number;
    phase?: number;
    spacing: number;
    type?: HatchFamilyType;
    wavelength?: number;
}

Properties

amplitude?: number

Wavy only. Peak displacement perpendicular to the line direction. 0 collapses to a straight line. Defaults to lineWidth (so the wave height matches the line thickness — a recognisable "fluttery" insulation hatch).

angle: number

For line / wavy / brick: direction perpendicular to the line direction, in degrees clockwise from horizontal. For dot: rotation of the dot grid.

brickHeight?: number

Brick only. Brick height (perpendicular to the row direction). Defaults to spacing × 0.5 — a 2:1 brick aspect ratio matching typical engineering masonry.

courseOffset?: number

Brick only. Shift between consecutive rows along the row direction. Defaults to spacing × 0.5 — a half-brick stagger producing standard running-bond brickwork.

lineWidth: number

For line / wavy: line thickness. For dot: dot diameter. For brick: mortar thickness.

phase?: number

Shift the pattern start position by this many units along the family's primary axis. Defaults to 0. Useful for aligning a hatch to a feature edge (wall corner, centerline start).

spacing: number

For line / wavy: distance between adjacent lines. For dot: grid pitch (same on both axes). For brick: brick width along the row direction. Must be > 0.

Family type — "line" (default), "dot", "wavy", or "brick". See HatchFamilyType.

wavelength?: number

Wavy only. Distance along the line direction for one complete wave. Defaults to spacing × 2.