mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 18:11:24 +01:00
fix: getColor is not defined
This commit is contained in:
parent
b142df8f0a
commit
a3df07f5e6
2 changed files with 4 additions and 4 deletions
|
|
@ -140,9 +140,5 @@ function drawHeightmap() {
|
||||||
return chain.filter((d, i) => i % n === 0);
|
return chain.filter((d, i) => i % n === 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getColor(value, scheme = getColorScheme("bright")) {
|
|
||||||
return scheme(1 - (value < 20 ? value - 5 : value) / 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
TIME && console.timeEnd("drawHeightmap");
|
TIME && console.timeEnd("drawHeightmap");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,10 @@ function getColorScheme(scheme = "bright") {
|
||||||
return heightmapColorSchemes[scheme];
|
return heightmapColorSchemes[scheme];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getColor(value, scheme = getColorScheme("bright")) {
|
||||||
|
return scheme(1 - (value < 20 ? value - 5 : value) / 100);
|
||||||
|
}
|
||||||
|
|
||||||
// Toggle style sections on element select
|
// Toggle style sections on element select
|
||||||
styleElementSelect.on("change", selectStyleElement);
|
styleElementSelect.on("change", selectStyleElement);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue