mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
Custom heightmap color scheme (#1013)
* feat: custom heightmap color scheme * feat: custom heightmap color scheme - add shceme on load --------- Co-authored-by: Azgaar <azgaar.fmg@yandex.com>
This commit is contained in:
parent
778bea15ee
commit
958a2c6ef8
10 changed files with 216 additions and 64 deletions
|
|
@ -97,9 +97,7 @@ function applyStyle(style) {
|
|||
|
||||
// add custom heightmap color scheme
|
||||
if (selector === "#terrs" && attribute === "scheme" && !(value in heightmapColorSchemes)) {
|
||||
const colors = value.split(",");
|
||||
heightmapColorSchemes[value] = d3.scaleSequential(d3.interpolateRgbBasis(colors));
|
||||
document.getElementById("styleHeightmapScheme").options.add(new Option(value, value));
|
||||
addCustomColorScheme(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue