feat: allow to render ocean heightmap - test

This commit is contained in:
Azgaar 2024-02-11 21:33:58 +01:00
parent cd45ad91fd
commit 94280e0acf
7 changed files with 171 additions and 104 deletions

View file

@ -329,7 +329,7 @@ function drawCellsValue(data) {
function drawPolygons(data) {
const max = d3.max(data),
min = d3.min(data),
scheme = getColorScheme(terrs.attr("scheme"));
scheme = getColorScheme(terrs.select("#landHeights").attr("scheme"));
data = data.map(d => 1 - normalize(d, min, max));
debug.selectAll("polygon").remove();
@ -338,7 +338,7 @@ function drawPolygons(data) {
.data(data)
.enter()
.append("polygon")
.attr("points", (d, i) => getPackPolygon(i))
.attr("points", (d, i) => getGridPolygon(i))
.attr("fill", d => scheme(d))
.attr("stroke", d => scheme(d));
}