@chrtco/sdk 0.10.13 → 0.10.15
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 +37 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +37 -4
- 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,14 @@ var LAND_THEMES = {
|
|
|
28018
28023
|
label: "#5b4f3a",
|
|
28019
28024
|
halo: "#f2ead6",
|
|
28020
28025
|
shadow: "#6b5a3e",
|
|
28021
|
-
highlight: "#fffaf0"
|
|
28026
|
+
highlight: "#fffaf0",
|
|
28027
|
+
fade: "#e8f2f8",
|
|
28028
|
+
// Raised from 0.45 on 2026-08-23. ⚠ Above the ~0.5 that
|
|
28029
|
+
// hillshade-style.mjs warns "starts competing with depth areas" — a
|
|
28030
|
+
// deliberate, sighted choice made against rendered evidence, not a
|
|
28031
|
+
// default. If soundings or DEPARE ever read as fighting the terrain,
|
|
28032
|
+
// this number is the first thing to walk back.
|
|
28033
|
+
exaggeration: 0.8
|
|
28022
28034
|
},
|
|
28023
28035
|
DUSK: {
|
|
28024
28036
|
base: "#4a4433",
|
|
@@ -28030,7 +28042,10 @@ var LAND_THEMES = {
|
|
|
28030
28042
|
label: "#c3b898",
|
|
28031
28043
|
halo: "#2b2820",
|
|
28032
28044
|
shadow: "#2e2a20",
|
|
28033
|
-
highlight: "#8a8068"
|
|
28045
|
+
highlight: "#8a8068",
|
|
28046
|
+
fade: "#16202a",
|
|
28047
|
+
// Unchanged. DUSK was not the palette the 0.8 decision was made against.
|
|
28048
|
+
exaggeration: 0.45
|
|
28034
28049
|
},
|
|
28035
28050
|
NIGHT: {
|
|
28036
28051
|
base: "#2a2620",
|
|
@@ -28042,7 +28057,13 @@ var LAND_THEMES = {
|
|
|
28042
28057
|
label: "#7d745e",
|
|
28043
28058
|
halo: "#15130f",
|
|
28044
28059
|
shadow: "#1a1712",
|
|
28045
|
-
highlight: "#4a4436"
|
|
28060
|
+
highlight: "#4a4436",
|
|
28061
|
+
fade: "#07090b",
|
|
28062
|
+
// ⚠ DELIBERATELY NOT RAISED. See the type's note: a strong hillshade
|
|
28063
|
+
// under red night vision is a grey haze over exactly the contrast a
|
|
28064
|
+
// skipper is navigating by. Left at the shipped value rather than
|
|
28065
|
+
// lowered, because lowering it is a separate decision from this one.
|
|
28066
|
+
exaggeration: 0.45
|
|
28046
28067
|
}
|
|
28047
28068
|
};
|
|
28048
28069
|
var FITS = ["<=", ["coalesce", ["get", "min_z"], 0], ["zoom"]];
|
|
@@ -28105,7 +28126,7 @@ function landLayers(opts = {}) {
|
|
|
28105
28126
|
type: "hillshade",
|
|
28106
28127
|
source: demSrc,
|
|
28107
28128
|
paint: {
|
|
28108
|
-
"hillshade-exaggeration":
|
|
28129
|
+
"hillshade-exaggeration": T.exaggeration,
|
|
28109
28130
|
"hillshade-shadow-color": T.shadow,
|
|
28110
28131
|
"hillshade-highlight-color": T.highlight,
|
|
28111
28132
|
"hillshade-accent-color": T.shadow
|
|
@@ -28123,6 +28144,18 @@ function landLayers(opts = {}) {
|
|
|
28123
28144
|
"line-opacity": 0.7
|
|
28124
28145
|
}
|
|
28125
28146
|
}));
|
|
28147
|
+
const d = FADE_PX / 2 / FADE_BANDS;
|
|
28148
|
+
for (let k = 0; k < FADE_BANDS; k++) {
|
|
28149
|
+
const width = k === 0 ? { "line-width": 2 * d } : { "line-width": d, "line-gap-width": 2 * k * d };
|
|
28150
|
+
layers.push(L({
|
|
28151
|
+
id: `chrtland-fade-${k}`,
|
|
28152
|
+
type: "line",
|
|
28153
|
+
source: src,
|
|
28154
|
+
"source-layer": "land_edge",
|
|
28155
|
+
layout: { "line-join": "bevel" },
|
|
28156
|
+
paint: { "line-color": T.fade, "line-blur": 0, "line-opacity": fadeAlpha(k * d + d / 2), ...width }
|
|
28157
|
+
}));
|
|
28158
|
+
}
|
|
28126
28159
|
layers.push(L({
|
|
28127
28160
|
id: "chrtland-road",
|
|
28128
28161
|
type: "line",
|