UNPKG

gen-biome

Version:

Procedural generation of 2D maps with distinct biomes

16 lines (15 loc) 616 B
import { WorldBiome } from '../biome'; import type { WorldBiomeConfig } from '../biome/types'; import { World } from '../world'; import type { WorldConfig } from '../world/types'; import type { WorldGenerationParams } from './types'; export declare class WorldGenerator<T extends object> { readonly config: WorldConfig; private biomes; constructor(config: WorldConfig); addBiome(config: WorldBiomeConfig, data: T): WorldBiome<T>; clearBiomes(): void; getBiomes(): WorldBiome<T>[]; peakBiome(height: number): WorldBiome<T> | null; generate(params?: WorldGenerationParams): World<T>; }