UNPKG

gen-city

Version:
36 lines (35 loc) 1.04 kB
import { Node } from './node'; import { Path } from './path'; import type { CityData, CityGenerationParametersCustom } from './types'; export declare class City { readonly width: number; readonly height: number; private seed; private matrix; private nodes; private gauge; private params; constructor({ width, height }: CityData); getSeed(): number[] | null; getAllBuildings(): import("./building").Building[]; getAllNodes(): Node[]; getAllPaths(): Path[]; generate(params?: CityGenerationParametersCustom): Promise<void>; private reset; private generatePaths; private processingPath; private generateBuildings; private processingBuilding; private getAt; private markAt; private isEmptyAt; private addNode; private closePath; private forkPath; private turnPath; private splitPath; private getCross; private filterDirections; variabilityChance(value: number): boolean; variabilityRange(min: number, max: number): number; }