threejs-worldgen
    Preparing search index...

    Interface FarmOptions

    Every setting of a farmstead (City with size: 'farmstead'). Sizes in metres.

    interface FarmOptions {
        barn: {
            colors: string[];
            gambrel: number;
            length: [number, number];
            wallHeight: [number, number];
            width: [number, number];
        };
        colors: Record<Crop, string[]>;
        contourSlope: number;
        cropMargin: [number, number];
        crops: Record<Crop, CropRule>;
        farmhouse: {
            depth: [number, number];
            floors: [number, number];
            width: [number, number];
        };
        fences: { length: number; variant: string };
        fieldGap: number;
        fieldMaxSlope: number;
        fieldMinArea: number;
        fieldOffset: number;
        fieldSize: [number, number];
        fieldStep: number;
        hayBales: [number, number];
        headland: number;
        maxDriveway: number;
        maxSlope: number;
        road: [number, number][];
        roadDistance: number;
        roadSpan: number;
        roadType: RoadType;
        rowContrast: Record<Crop, number>;
        rowSpacing: Record<Crop, number>;
        search: number;
        shed: {
            height: [number, number];
            length: [number, number];
            width: [number, number];
        };
        silos: {
            count: [number, number];
            height: [number, number];
            radius: [number, number];
        };
        streaks: number;
        tractorWorking: number;
        tramlines: Record<Crop, number>;
        variation: number;
        yard: [number, number];
        yardColor: string;
    }
    Index
    barn: {
        colors: string[];
        gambrel: number;
        length: [number, number];
        wallHeight: [number, number];
        width: [number, number];
    }

    Barn: width, length and wall height ranges; chance (0..1) of a gambrel roof (else gable); wall colours (red or weathered timber).

    colors: Record<Crop, string[]>

    Ground colours per crop (#rrggbb); each field picks one.

    contourSlope: number

    Slope (rise / run) from which rows follow the contours.

    cropMargin: [number, number]

    How far outside a crop's ranges its weight fades out: [°C, moisture].

    crops: Record<Crop, CropRule>

    Crops by climate.

    farmhouse: {
        depth: [number, number];
        floors: [number, number];
        width: [number, number];
    }

    Farmhouse: width (along the yard front) and depth ranges, floors.

    fences: { length: number; variant: string }

    Pasture fences: segment length and props variant.

    fieldGap: number

    Gap between fields (hedgerows, field margins).

    fieldMaxSlope: number

    Steepest ground that is farmed; steeper stays wild.

    fieldMinArea: number

    Smallest field kept, m².

    fieldOffset: number

    Fields and yard float this far above the ground (hides terrain mesh facets).

    fieldSize: [number, number]

    Field size range (each side of the patchwork picks within it).

    fieldStep: number

    Field mesh grid step.

    hayBales: [number, number]

    Hay bales in a field (count range).

    headland: number

    Width of the headland round a cropped field (where the tractor turns).

    maxDriveway: number

    Longest driveway; a farm further from its road isn't built.

    maxSlope: number

    Steepest ground (rise / run) the farmyard may stand on.

    road: [number, number][]

    The road the driveway joins, a frame-local polyline (planCities sets it from the population's road network); empty = a country road is laid past the farm.

    roadDistance: number

    Without road: how far the laid road passes from the farmyard.

    roadSpan: number

    Length of road drawn either side of the driveway.

    roadType: RoadType

    Class of that road (its width and surface).

    rowContrast: Record<Crop, number>

    Row stripe contrast per crop, 0..1 (fades out with distance, no aliasing).

    rowSpacing: Record<Crop, number>

    Row spacing per crop (0 = no rows).

    search: number

    How far the yard may move from the settlement's position to find dry, gentle ground.

    shed: {
        height: [number, number];
        length: [number, number];
        width: [number, number];
    }

    Machine shed: width, length and wall height ranges.

    silos: {
        count: [number, number];
        height: [number, number];
        radius: [number, number];
    }

    Grain silos: how many (range), radius and height ranges.

    streaks: number

    Contrast of the streaks cultivation leaves along the rows.

    tractorWorking: number

    Chance (0..1) that the tractor is out working a field (else parked in the yard).

    tramlines: Record<Crop, number>

    Tramline spacing per crop (sprayer tracks; 0 = none).

    variation: number

    ± brightness of the gentle, large-scale variation across fields (soil and moisture).

    yard: [number, number]

    Farmyard size [along the driveway, across].

    yardColor: string

    Farmyard ground colour.