UNPKG

randiny

Version:

<h1 style="margin-bottom: 0">Randiny</h1> <h2 style="font-size: 14px; margin-top: 0">A pseudo random number generator, capable of generating random numbers, and noise maps.</h2>

42 lines 1.38 kB
import RNG from "./RNG"; import RandomNumber from "./RandomNumber"; export declare class StaticMap1D { private readonly map; constructor(rng: RNG, length: number); get(index: number): RandomNumber; /** * Get a range of the map * @param start Start of the range you want to find. Inclusive * @param end End of the range you want to find. Inclusive */ getRange(start: number, end: number): void; getFullMap(): RandomNumber[]; } export declare class StaticMap2D { private readonly map; constructor(rng: RNG, width: number, height: number); get(x: number, y: number): RandomNumber; getRow(y: number): RandomNumber[]; getCol(x: number): RandomNumber[]; /** * Returns a yx array of rows like this.\ * [row,row,row] */ getFullMap(): RandomNumber[][]; } export declare class StaticMap3D { private readonly map; constructor(rng: RNG, width: number, height: number, depth: number); get(x: number, y: number, z: number): RandomNumber; getRow(y: number): RandomNumber[][]; getCol(x: number): RandomNumber[][]; getDepths(x: number, y: number): RandomNumber[]; /** * Returns a yx array of columns like this.\ * [row,row,row]\ * each row like this * [depths,depths,depths] */ getFullMap(): RandomNumber[][][]; } //# sourceMappingURL=StaticMap.d.ts.map