@chrtco/sdk 0.10.13 → 0.10.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +23 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +23 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -28224,6 +28224,11 @@ function getOrderedClasses() {
|
|
|
28224
28224
|
}
|
|
28225
28225
|
|
|
28226
28226
|
// src/atlas/land-layers.ts
|
|
28227
|
+
var FADE_PX = 80;
|
|
28228
|
+
var FADE_BANDS = 16;
|
|
28229
|
+
function fadeAlpha(r) {
|
|
28230
|
+
return Math.max(0, Math.min(1, (FADE_PX / 2 - Math.abs(r)) / FADE_PX));
|
|
28231
|
+
}
|
|
28227
28232
|
var LAND_THEMES = {
|
|
28228
28233
|
DAY: {
|
|
28229
28234
|
base: "#e8d9b0",
|
|
@@ -28235,7 +28240,8 @@ var LAND_THEMES = {
|
|
|
28235
28240
|
label: "#5b4f3a",
|
|
28236
28241
|
halo: "#f2ead6",
|
|
28237
28242
|
shadow: "#6b5a3e",
|
|
28238
|
-
highlight: "#fffaf0"
|
|
28243
|
+
highlight: "#fffaf0",
|
|
28244
|
+
fade: "#e8f2f8"
|
|
28239
28245
|
},
|
|
28240
28246
|
DUSK: {
|
|
28241
28247
|
base: "#4a4433",
|
|
@@ -28247,7 +28253,8 @@ var LAND_THEMES = {
|
|
|
28247
28253
|
label: "#c3b898",
|
|
28248
28254
|
halo: "#2b2820",
|
|
28249
28255
|
shadow: "#2e2a20",
|
|
28250
|
-
highlight: "#8a8068"
|
|
28256
|
+
highlight: "#8a8068",
|
|
28257
|
+
fade: "#16202a"
|
|
28251
28258
|
},
|
|
28252
28259
|
NIGHT: {
|
|
28253
28260
|
base: "#2a2620",
|
|
@@ -28259,7 +28266,8 @@ var LAND_THEMES = {
|
|
|
28259
28266
|
label: "#7d745e",
|
|
28260
28267
|
halo: "#15130f",
|
|
28261
28268
|
shadow: "#1a1712",
|
|
28262
|
-
highlight: "#4a4436"
|
|
28269
|
+
highlight: "#4a4436",
|
|
28270
|
+
fade: "#07090b"
|
|
28263
28271
|
}
|
|
28264
28272
|
};
|
|
28265
28273
|
var FITS = ["<=", ["coalesce", ["get", "min_z"], 0], ["zoom"]];
|
|
@@ -28340,6 +28348,18 @@ function landLayers(opts = {}) {
|
|
|
28340
28348
|
"line-opacity": 0.7
|
|
28341
28349
|
}
|
|
28342
28350
|
}));
|
|
28351
|
+
const d = FADE_PX / 2 / FADE_BANDS;
|
|
28352
|
+
for (let k = 0; k < FADE_BANDS; k++) {
|
|
28353
|
+
const width = k === 0 ? { "line-width": 2 * d } : { "line-width": d, "line-gap-width": 2 * k * d };
|
|
28354
|
+
layers.push(L({
|
|
28355
|
+
id: `chrtland-fade-${k}`,
|
|
28356
|
+
type: "line",
|
|
28357
|
+
source: src,
|
|
28358
|
+
"source-layer": "land_edge",
|
|
28359
|
+
layout: { "line-join": "bevel" },
|
|
28360
|
+
paint: { "line-color": T.fade, "line-blur": 0, "line-opacity": fadeAlpha(k * d + d / 2), ...width }
|
|
28361
|
+
}));
|
|
28362
|
+
}
|
|
28343
28363
|
layers.push(L({
|
|
28344
28364
|
id: "chrtland-road",
|
|
28345
28365
|
type: "line",
|