mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
feat: burg group editor - apply changes
This commit is contained in:
parent
b6708bf698
commit
b700bf0630
8 changed files with 102 additions and 29 deletions
21
main.js
21
main.js
|
|
@ -151,10 +151,7 @@ let notes = [];
|
|||
let rulers = new Rulers();
|
||||
let customization = 0;
|
||||
|
||||
let biomesData = Biomes.getDefault();
|
||||
let nameBases = Names.getNameBases(); // cultures-related data
|
||||
|
||||
// default options, based on Earth data
|
||||
// global options; in v2.0 to be used for all UI settings
|
||||
let options = {
|
||||
pinNotes: false,
|
||||
winds: [225, 45, 225, 315, 135, 315],
|
||||
|
|
@ -163,21 +160,19 @@ let options = {
|
|||
temperatureSouthPole: -15,
|
||||
stateLabelsMode: "auto",
|
||||
showBurgPreview: true,
|
||||
villageMaxPopulation: 2000,
|
||||
burgs: {
|
||||
groups: Burgs.getDefaultGroups()
|
||||
}
|
||||
};
|
||||
|
||||
// create groups for each burg type
|
||||
{
|
||||
const sortedGroups = [...options.burgs.groups].sort((a, b) => a.order - b.order);
|
||||
for (const {name} of sortedGroups) {
|
||||
burgIcons.append("g").attr("id", name);
|
||||
burgLabels.append("g").attr("id", name);
|
||||
}
|
||||
}
|
||||
// global style object; in v2.0 to be used for all map styles and render settings
|
||||
let style = {
|
||||
burgLabels: {},
|
||||
burgIcons: {}
|
||||
};
|
||||
|
||||
let biomesData = Biomes.getDefault();
|
||||
let nameBases = Names.getNameBases(); // cultures-related data
|
||||
let color = d3.scaleSequential(d3.interpolateSpectral); // default color scheme
|
||||
const lineGen = d3.line().curve(d3.curveBasis); // d3 line generator with default curve interpolation
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue