From 1516b1f11c384c6c6b608da5fb73a226fcd7cd1b Mon Sep 17 00:00:00 2001 From: StempunkDev Date: Tue, 25 Jul 2023 13:53:22 +0200 Subject: [PATCH] Changed Names: Currently still only on NorthTemperature reliant, compadible version --- index.html | 12 ++++++------ main.js | 4 ++-- modules/ui/world-configurator.js | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index 4f5ff82b..16bb9ebc 100644 --- a/index.html +++ b/index.html @@ -2358,14 +2358,14 @@ Poles:
North Pole - °C = - °F - + °C = + °F +
South Pole - °C = - °F - + °C = + °F +
diff --git a/main.js b/main.js index d2ba4053..4e2997a1 100644 --- a/main.js +++ b/main.js @@ -1010,9 +1010,9 @@ function calculateTemperatures() { cells.temp = new Int8Array(cells.i.length); // temperature array const tEq = +temperatureEquatorInput.value; - const tPoleN = +temperaturePoleInput.value; + const tPoleN = +temperatureNorthPoleInput.value; //TODO Find proper delta to calculate - const tSPole = +temperatureSPoleInput.value; + const tSPole = +temperatureSouthPoleInput.value; const tDelta = tEq - tPoleN; const int = d3.easePolyInOut.exponent(0.5); // interpolation function diff --git a/modules/ui/world-configurator.js b/modules/ui/world-configurator.js index 73a3621e..6e62b71d 100644 --- a/modules/ui/world-configurator.js +++ b/modules/ui/world-configurator.js @@ -107,11 +107,11 @@ function editWorld() { function updateGlobeTemperature() { const tEq = +document.getElementById("temperatureEquatorOutput").value; document.getElementById("temperatureEquatorF").innerHTML = rn((tEq * 9) / 5 + 32); - const tPole = +document.getElementById("temperaturePoleOutput").value; - document.getElementById("temperaturePoleF").innerHTML = rn((tPole * 9) / 5 + 32); - globe.selectAll(".tempGradient90").attr("stop-color", clr(1 - (tPole - tMin) / (tMax - tMin))); - globe.selectAll(".tempGradient60").attr("stop-color", clr(1 - (tEq - ((tEq - tPole) * 2) / 3 - tMin) / (tMax - tMin))); - globe.selectAll(".tempGradient30").attr("stop-color", clr(1 - (tEq - ((tEq - tPole) * 1) / 3 - tMin) / (tMax - tMin))); + const tNPole = +document.getElementById("temperatureNorthPoleOutput").value; + document.getElementById("temperatureNorthPoleF").innerHTML = rn((tNPole * 9) / 5 + 32); + globe.selectAll(".tempGradient90").attr("stop-color", clr(1 - (tNPole - tMin) / (tMax - tMin))); + globe.selectAll(".tempGradient60").attr("stop-color", clr(1 - (tEq - ((tEq - tNPole) * 2) / 3 - tMin) / (tMax - tMin))); + globe.selectAll(".tempGradient30").attr("stop-color", clr(1 - (tEq - ((tEq - tNPole) * 1) / 3 - tMin) / (tMax - tMin))); globe.select(".tempGradient0").attr("stop-color", clr(1 - (tEq - tMin) / (tMax - tMin))); }