threejs-worldgen
    Preparing search index...

    Function placeTile

    • Places the instances of one group of layers (layers sharing a point set) inside one tile. Pure and deterministic: the result depends only on the arguments, so tiles stitch and can be generated in any order (or in a worker).

      Parameters

      • layers: readonly PlacementRules[]

        The group's layers, in priority order. layers[0].spacing sets the point spacing.

      • x0: number
      • z0: number
      • size: number
      • seed: number

        Usually groupSeed(scatterSeed, groupName).

      • height: HeightFn

        Terrain height; points where it returns NaN are skipped.

      Returns Float32Array<ArrayBufferLike>[]

      One array per layer of INSTANCE_STRIDE floats per instance.