feat: custom heightmap color scheme - add shceme on load

This commit is contained in:
Azgaar 2023-11-17 03:46:28 +04:00
parent 2ce83643a6
commit 1fe553532d
4 changed files with 29 additions and 13 deletions

View file

@ -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);
}
}
}