threejs-worldgen
    Preparing search index...

    Interface CornSettings

    Every setting of a Corn field. All are optional on input; see CornInput.

    interface CornSettings {
        buildBudget: number;
        canopyResolution: number;
        castShadow: boolean;
        chunkSize: number;
        colorVariation: number;
        debugLods: boolean;
        dryColor: string;
        fields: CornField[];
        flattenResolution: number;
        growth: number;
        harvested: boolean;
        height: number;
        heightVariation: number;
        interactionStrength: number;
        interactors: Interactor[];
        leafColor: string;
        lods: CornLOD[];
        patchiness: number;
        plantSpacing: number;
        receiveShadow: boolean;
        seed: number;
        shadowDistance: number;
        soilColor: string;
        stiffness: number;
        stubbleHeight: number;
        sun: DirectionalLight | null;
        tasselColor: string;
        translucency: number;
        wind: WindOptions;
        youngColor: string;
    }
    Index
    buildBudget: number

    Milliseconds per frame spent building chunks, nearest first.

    canopyResolution: number

    Grid size (metres) of the canopy surface that stands in for far plants.

    castShadow: boolean

    Whether plants within shadowDistance cast shadows.

    chunkSize: number

    Edge length (metres) of the chunks plants are built in around the camera.

    colorVariation: number

    0..1 per-plant brightness variation.

    debugLods: boolean

    Tints corn by level of detail (red, yellow, green; canopy red → blue as it rises).

    dryColor: string

    Dry leaf, husk and stubble colour.

    fields: CornField[]

    The fields to plant, e.g. from threejs-city's farm planner.

    flattenResolution: number

    Texel size (metres) of the map remembering where corn was flattened.

    growth: number

    Growth stage: 0 seedling, ~0.65 full height, 0.8 mature (tassels and ears), 1 dry and brown.

    harvested: boolean

    Harvested: only stubble is left.

    height: number

    Mature plant height in metres, tassel included (1.5–3 m).

    heightVariation: number

    0..1 random height spread per plant.

    interactionStrength: number

    Global multiplier on how strongly interactors push and flatten corn. 0 = not at all.

    interactors: Interactor[]

    Up to 16 objects that push corn aside and flatten what they drive over (tractor wheels, harvesters…).

    leafColor: string

    Mature leaf colour (any CSS colour).

    lods: CornLOD[]

    Exactly four levels of detail, near → far. Plants end at the last distance; the canopy covers the rest.

    patchiness: number

    0..1 field-scale brightness and dryness variation.

    plantSpacing: number

    Distance between plants along a row, in metres.

    receiveShadow: boolean

    Whether plants and canopy receive shadows.

    seed: number

    Layout seed: the same seed always plants the same fields.

    shadowDistance: number

    Radius (metres) around the camera in which plants cast shadows.

    soilColor: string

    Soil colour between young rows and under the canopy.

    stiffness: number

    Higher = less wind and interaction bending.

    stubbleHeight: number

    Stubble height in metres after harvest.

    sun: DirectionalLight | null

    Light used for back-lit translucency. null = first DirectionalLight found in the scene.

    tasselColor: string

    Tassel colour.

    translucency: number

    0..1 how much sunlight shines through back-lit leaves.

    Procedural wind, shared with grass (see WindOptions).

    youngColor: string

    Young leaf colour.