threejs-worldgen
    Preparing search index...

    Function selectChunks

    • Chooses which chunks to draw and which to build for a camera position (planet-centred or flat-world metres). Splits by distance, culls by view distance (flat) or horizon (planet), and never leaves a hole: while a chunk's children are being built it keeps drawing the chunk, and while a merged chunk is being built it keeps drawing its children.

      Parameters

      • world: World
      • camera: Vec3
      • s: LodSettings
      • bounds: (k: ChunkKey) => ChunkBounds | undefined

        Returns bounds for built chunks, undefined for chunks not built yet.

      • maxElevation: number

        Conservative highest terrain height, for chunks not built yet.

      Returns ChunkSelection