mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 12:01:23 +01:00
feat: allow to render ocean heightmap - fix issue
This commit is contained in:
parent
94280e0acf
commit
2d0cd90f6e
9 changed files with 37 additions and 42 deletions
|
|
@ -54,8 +54,6 @@ window.Cultures = (function () {
|
|||
const colors = getColors(count);
|
||||
const emblemShape = document.getElementById("emblemShape").value;
|
||||
|
||||
console.log("--- c1 ---", Math.random());
|
||||
|
||||
const codes = [];
|
||||
|
||||
cultures.forEach(function (c, i) {
|
||||
|
|
@ -73,33 +71,24 @@ window.Cultures = (function () {
|
|||
return;
|
||||
}
|
||||
|
||||
console.log(JSON.stringify(c, null, 2));
|
||||
console.log(Array.from(pack.cells.s).join());
|
||||
|
||||
const sortingFn = c.sort ? c.sort : i => cells.s[i];
|
||||
const center = placeCenter(sortingFn);
|
||||
|
||||
console.log("--- c2-1 ---", i, Math.random());
|
||||
centers.add(cells.p[center]);
|
||||
c.center = center;
|
||||
c.i = newId;
|
||||
delete c.odd;
|
||||
delete c.sort;
|
||||
c.color = colors[i];
|
||||
console.log("--- c2-2 ---", i, Math.random());
|
||||
c.type = defineCultureType(center);
|
||||
console.log("--- c2-3 ---", i, Math.random());
|
||||
c.expansionism = defineCultureExpansionism(c.type);
|
||||
c.origins = [0];
|
||||
c.code = abbreviate(c.name, codes);
|
||||
codes.push(c.code);
|
||||
cultureIds[center] = newId;
|
||||
if (emblemShape === "random") c.shield = getRandomShield();
|
||||
console.log("--- c2-4 ---", i, Math.random());
|
||||
});
|
||||
|
||||
console.log("--- c3 ---", Math.random());
|
||||
|
||||
cells.culture = cultureIds;
|
||||
|
||||
function placeCenter(sortingFn) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue