threejs-worldgen
    Preparing search index...

    Interface CornProps

    Props of the <Corn> component: every CornInput setting plus the ones below.

    interface CornProps {
        buildBudget?: number;
        camera?: Camera;
        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;
        ref?: Ref<Corn | null>;
        seed?: number;
        shadowDistance?: number;
        soilColor?: string;
        stiffness?: number;
        stubbleHeight?: number;
        sun?: DirectionalLight | null;
        tasselColor?: string;
        terrain?: Terrain | RefObject<Object3D<Object3DEventMap> | null>;
        translucency?: number;
        wind?: Partial<WindOptions>;
        youngColor?: string;
    }

    Hierarchy (View Summary)

    Index
    buildBudget?: number

    Milliseconds per frame spent building chunks, nearest first.

    camera?: Camera

    Camera the levels of detail follow. Defaults to the R3F default camera.

    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.

    ref?: Ref<Corn | null>

    Receives the underlying Corn instance (for flatten, flattened, stats, …).

    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.

    terrain?: Terrain | RefObject<Object3D<Object3DEventMap> | null>

    Mesh/group (or a ref to one) or a (x, z) => y height function, as for <Grass>.

    translucency?: number

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

    wind?: Partial<WindOptions>

    Wind settings to change; unspecified fields keep their current value.

    youngColor?: string

    Young leaf colour.