diff --git a/index.html b/index.html
index 0702d3fc..adbddd4e 100644
--- a/index.html
+++ b/index.html
@@ -8088,7 +8088,7 @@
-
+
diff --git a/modules/ui/layers.js b/modules/ui/layers.js
index ac9f37ab..0e0e1597 100644
--- a/modules/ui/layers.js
+++ b/modules/ui/layers.js
@@ -424,13 +424,14 @@ function drawIce() {
const {temp, h} = cells;
Math.random = aleaPRNG(seed);
- const ICEBERG_MAX_TEMP = 1;
- const ICE_SHIELD_MAX_TEMP = -8;
+ const ICEBERG_MAX_TEMP = 0;
+ const GLACIER_MAX_TEMP = -8;
+ const minMaxTemp = d3.min(temp);
- // very cold: draw ice shields
+ // cold land: draw glaciers
{
const type = "iceShield";
- const getType = cellId => (temp[cellId] <= ICE_SHIELD_MAX_TEMP ? type : null);
+ const getType = cellId => (h[cellId] >= 20 && temp[cellId] <= GLACIER_MAX_TEMP ? type : null);
const isolines = getIsolines(grid, getType, {polygons: true});
isolines[type]?.polygons?.forEach(points => {
const clipped = clipPoly(points);
@@ -438,21 +439,18 @@ function drawIce() {
});
}
- // mildly cold: draw icebergs
+ // cold water: draw icebergs
for (const cellId of grid.cells.i) {
const t = temp[cellId];
- if (t > ICEBERG_MAX_TEMP) continue; // too warm: no icebergs
- if (t <= ICE_SHIELD_MAX_TEMP) continue; // already drawn as ice shield
if (h[cellId] >= 20) continue; // no icebergs on land
+ if (t > ICEBERG_MAX_TEMP) continue; // too warm: no icebergs
if (features[cells.f[cellId]].type === "lake") continue; // no icebers on lakes
+ if (P(0.8)) continue; // skip most of eligible cells
- const tNormalized = normalize(t, -8, 2);
- const randomFactor = t > -5 ? 0.4 + rand() * 1.2 : 1;
- if (P(tNormalized ** 0.5 * randomFactor)) continue; // cold: skip some cells
-
- let defaultSize = 1 - tNormalized; // iceberg size: 0 = zero size, 1 = full size
- if (cells.t[cellId] === -1) defaultSize /= 1.3; // coasline: smaller icebergs
- const size = minmax(rn(defaultSize * randomFactor, 2), 0.08, 1);
+ const randomFactor = 0.8 + rand() * 0.4; // random size factor
+ let baseSize = (1 - normalize(t, minMaxTemp, 1)) * 0.8; // size: 0 = zero size, 1 = full size
+ if (cells.t[cellId] === -1) baseSize /= 1.3; // coasline: smaller icebergs
+ const size = minmax(rn(baseSize * randomFactor, 2), 0.1, 1);
const [cx, cy] = grid.points[cellId];
const points = getGridPolygon(cellId).map(([x, y]) => [rn(lerp(cx, x, size), 2), rn(lerp(cy, y, size), 2)]);
diff --git a/styles/default.json b/styles/default.json
index 9168debc..23b06487 100644
--- a/styles/default.json
+++ b/styles/default.json
@@ -248,10 +248,10 @@
},
"#ice": {
"opacity": 0.9,
- "fill": "#e8f0f6",
+ "fill": "#f1f8fe",
"stroke": "#e8f0f6",
- "stroke-width": 1,
- "filter": "url(#dropShadow05)"
+ "stroke-width": 0.5,
+ "filter": "url(#dropShadow01)"
},
"#emblems": {
"opacity": 0.9,
diff --git a/versioning.js b/versioning.js
index cd834d52..57f0d9f5 100644
--- a/versioning.js
+++ b/versioning.js
@@ -13,7 +13,7 @@
* Example: 1.102.2 -> Major version 1, Minor version 102, Patch version 2
*/
-const VERSION = "1.108.2";
+const VERSION = "1.108.3";
if (parseMapVersion(VERSION) !== VERSION) alert("versioning.js: Invalid format or parsing function");
{