@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.js
CHANGED
|
@@ -28007,6 +28007,11 @@ function getOrderedClasses() {
|
|
|
28007
28007
|
}
|
|
28008
28008
|
|
|
28009
28009
|
// src/atlas/land-layers.ts
|
|
28010
|
+
var FADE_PX = 80;
|
|
28011
|
+
var FADE_BANDS = 16;
|
|
28012
|
+
function fadeAlpha(r) {
|
|
28013
|
+
return Math.max(0, Math.min(1, (FADE_PX / 2 - Math.abs(r)) / FADE_PX));
|
|
28014
|
+
}
|
|
28010
28015
|
var LAND_THEMES = {
|
|
28011
28016
|
DAY: {
|
|
28012
28017
|
base: "#e8d9b0",
|
|
@@ -28018,7 +28023,8 @@ var LAND_THEMES = {
|
|
|
28018
28023
|
label: "#5b4f3a",
|
|
28019
28024
|
halo: "#f2ead6",
|
|
28020
28025
|
shadow: "#6b5a3e",
|
|
28021
|
-
highlight: "#fffaf0"
|
|
28026
|
+
highlight: "#fffaf0",
|
|
28027
|
+
fade: "#e8f2f8"
|
|
28022
28028
|
},
|
|
28023
28029
|
DUSK: {
|
|
28024
28030
|
base: "#4a4433",
|
|
@@ -28030,7 +28036,8 @@ var LAND_THEMES = {
|
|
|
28030
28036
|
label: "#c3b898",
|
|
28031
28037
|
halo: "#2b2820",
|
|
28032
28038
|
shadow: "#2e2a20",
|
|
28033
|
-
highlight: "#8a8068"
|
|
28039
|
+
highlight: "#8a8068",
|
|
28040
|
+
fade: "#16202a"
|
|
28034
28041
|
},
|
|
28035
28042
|
NIGHT: {
|
|
28036
28043
|
base: "#2a2620",
|
|
@@ -28042,7 +28049,8 @@ var LAND_THEMES = {
|
|
|
28042
28049
|
label: "#7d745e",
|
|
28043
28050
|
halo: "#15130f",
|
|
28044
28051
|
shadow: "#1a1712",
|
|
28045
|
-
highlight: "#4a4436"
|
|
28052
|
+
highlight: "#4a4436",
|
|
28053
|
+
fade: "#07090b"
|
|
28046
28054
|
}
|
|
28047
28055
|
};
|
|
28048
28056
|
var FITS = ["<=", ["coalesce", ["get", "min_z"], 0], ["zoom"]];
|
|
@@ -28123,6 +28131,18 @@ function landLayers(opts = {}) {
|
|
|
28123
28131
|
"line-opacity": 0.7
|
|
28124
28132
|
}
|
|
28125
28133
|
}));
|
|
28134
|
+
const d = FADE_PX / 2 / FADE_BANDS;
|
|
28135
|
+
for (let k = 0; k < FADE_BANDS; k++) {
|
|
28136
|
+
const width = k === 0 ? { "line-width": 2 * d } : { "line-width": d, "line-gap-width": 2 * k * d };
|
|
28137
|
+
layers.push(L({
|
|
28138
|
+
id: `chrtland-fade-${k}`,
|
|
28139
|
+
type: "line",
|
|
28140
|
+
source: src,
|
|
28141
|
+
"source-layer": "land_edge",
|
|
28142
|
+
layout: { "line-join": "bevel" },
|
|
28143
|
+
paint: { "line-color": T.fade, "line-blur": 0, "line-opacity": fadeAlpha(k * d + d / 2), ...width }
|
|
28144
|
+
}));
|
|
28145
|
+
}
|
|
28126
28146
|
layers.push(L({
|
|
28127
28147
|
id: "chrtland-road",
|
|
28128
28148
|
type: "line",
|