threejs-worldgen
    Preparing search index...

    Function plantRows

    • Plants every field's rows inside a world-space rectangle [minX, maxX) × [minZ, maxZ). Rows lie on a lattice anchored at the field's first vertex, so adjacent rectangles stitch exactly and each plant falls in exactly one. Plants are jittered along the row a little, some spots stay empty, and leaves face roughly across the row (as real corn turns its leaves into the gaps). Output is sorted by rank, a per-plant random number in [0, 1): the first n plants are an even thinning of the rectangle, which is how distant levels of detail drop plants.

      Parameters

      • fields: readonly CornField[]
      • minX: number
      • minZ: number
      • maxX: number
      • maxZ: number
      • __namedParameters: PlantOptions

      Returns Float32Array