mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
refactor: voronoi
This commit is contained in:
parent
e59b536e83
commit
00d8d28d76
16 changed files with 1912 additions and 171 deletions
|
|
@ -96,7 +96,7 @@ function markup({
|
|||
}
|
||||
|
||||
// Re-mark features (ocean, lakes, islands)
|
||||
export function reMarkFeatures() {
|
||||
export function reMarkFeatures(pack: IPackBase, grid: IGrid) {
|
||||
TIME && console.time("reMarkFeatures");
|
||||
const {cells} = pack;
|
||||
const features: TPackFeatures = [0];
|
||||
|
|
@ -165,7 +165,7 @@ export function reMarkFeatures() {
|
|||
}
|
||||
|
||||
// markupPackLand
|
||||
markup({graph: pack, distanceField: pack.cells.t, start: 3, increment: 1, limit: INT8_MAX});
|
||||
markup({graph: pack, distanceField: cells.t, start: 3, increment: 1, limit: INT8_MAX});
|
||||
|
||||
function defineOceanGroup(number: number) {
|
||||
if (number > grid.cells.i.length / 25) return "ocean";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue