fix: getColor is not defined

This commit is contained in:
Azgaar 2024-09-13 15:31:21 +02:00
parent b142df8f0a
commit a3df07f5e6
2 changed files with 4 additions and 4 deletions

View file

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

View file

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