@massif-maps/style-tools 6.1.0-rc.1
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/README.md +58 -0
- package/dist/cli.js +436 -0
- package/dist/cli.js.map +1 -0
- package/dist/generated/properties.json +2488 -0
- package/dist/legend-svg.js +142 -0
- package/dist/legend-svg.js.map +1 -0
- package/dist/mapbox2css/browser-host.js +27 -0
- package/dist/mapbox2css/browser-host.js.map +1 -0
- package/dist/mapbox2css/casing.js +84 -0
- package/dist/mapbox2css/casing.js.map +1 -0
- package/dist/mapbox2css/config.js +212 -0
- package/dist/mapbox2css/config.js.map +1 -0
- package/dist/mapbox2css/contour.js +61 -0
- package/dist/mapbox2css/contour.js.map +1 -0
- package/dist/mapbox2css/coverage.js +56 -0
- package/dist/mapbox2css/coverage.js.map +1 -0
- package/dist/mapbox2css/emissive.js +192 -0
- package/dist/mapbox2css/emissive.js.map +1 -0
- package/dist/mapbox2css/expression.js +606 -0
- package/dist/mapbox2css/expression.js.map +1 -0
- package/dist/mapbox2css/filter.js +285 -0
- package/dist/mapbox2css/filter.js.map +1 -0
- package/dist/mapbox2css/fold.js +588 -0
- package/dist/mapbox2css/fold.js.map +1 -0
- package/dist/mapbox2css/host.js +13 -0
- package/dist/mapbox2css/host.js.map +1 -0
- package/dist/mapbox2css/index.js +3599 -0
- package/dist/mapbox2css/index.js.map +1 -0
- package/dist/mapbox2css/narrow.js +284 -0
- package/dist/mapbox2css/narrow.js.map +1 -0
- package/dist/mapbox2css/node-host.js +36 -0
- package/dist/mapbox2css/node-host.js.map +1 -0
- package/dist/mapbox2css/placement.js +62 -0
- package/dist/mapbox2css/placement.js.map +1 -0
- package/dist/mapbox2css/png.js +264 -0
- package/dist/mapbox2css/png.js.map +1 -0
- package/dist/mapbox2css/properties.js +155 -0
- package/dist/mapbox2css/properties.js.map +1 -0
- package/dist/mapbox2css/schema.js +865 -0
- package/dist/mapbox2css/schema.js.map +1 -0
- package/dist/mapbox2css/shield.js +118 -0
- package/dist/mapbox2css/shield.js.map +1 -0
- package/dist/mapbox2css/split.js +380 -0
- package/dist/mapbox2css/split.js.map +1 -0
- package/dist/mapbox2css/sprite.js +882 -0
- package/dist/mapbox2css/sprite.js.map +1 -0
- package/dist/mapbox2css/types.js +2 -0
- package/dist/mapbox2css/types.js.map +1 -0
- package/dist/mapbox2css/variables.js +273 -0
- package/dist/mapbox2css/variables.js.map +1 -0
- package/dist/wasm.js +43 -0
- package/dist/wasm.js.map +1 -0
- package/package.json +48 -0
- package/wasm/massif-style.mjs +2 -0
- package/wasm/massif-style.wasm +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coverage.js","sourceRoot":"","sources":["../../src/mapbox2css/coverage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,OAAO,QAAQ;IACR,OAAO,GAAG,IAAI,GAAG,EAAkB,CAAC;IACpC,OAAO,GAAG,IAAI,GAAG,EAAkE,CAAC;IACpF,KAAK,GAAa,EAAE,CAAC;IAC9B,qFAAqF;IAC5E,cAAc,GAAG,IAAI,GAAG,EAAkB,CAAC;IAEpD,IAAI,CAAC,QAAgB;QACjB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACtE,CAAC;IAED,IAAI,CAAC,QAAgB,EAAE,MAAc,EAAE,OAAe;QAClD,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,GAAG,EAAU,EAAE,CAAC;QAC5F,KAAK,CAAC,KAAK,EAAE,CAAC;QACd,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC1B,IAAI,CAAC,OAAO,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CAAC;QACD,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxB,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;QACjE,CAAC;QACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;CACJ"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { fromHsla, toHsla } from './fold.js';
|
|
2
|
+
/**
|
|
3
|
+
* `*-emissive-strength`, approximated by darkening the colour.
|
|
4
|
+
*
|
|
5
|
+
* Mapbox lights its 2D layers with the same scene lights as its 3D ones: emissive-strength is how
|
|
6
|
+
* much of a layer's colour is EMITTED rather than lit. At 1 the colour is drawn as authored; at 0 it
|
|
7
|
+
* is entirely at the mercy of the ambient and directional lights, so it goes dark at night. Standard
|
|
8
|
+
* sets it on 103 properties, and that - not different colours - is how its night preset gets dark.
|
|
9
|
+
*
|
|
10
|
+
* Our renderer has no such model for 2D geometry: it draws every colour as authored, which is
|
|
11
|
+
* emissive-strength 1 everywhere. So the lighting is folded into the colour at conversion time:
|
|
12
|
+
*
|
|
13
|
+
* shown = authored x (emissive + (1 - emissive) x brightness)
|
|
14
|
+
*
|
|
15
|
+
* with `brightness` the same scene value `measure-light` resolves to (see config.ts). A fully
|
|
16
|
+
* emissive layer is unchanged at any preset - which is what keeps labels and lit windows bright at
|
|
17
|
+
* night - and a non-emissive one follows the light down.
|
|
18
|
+
*
|
|
19
|
+
* The light has a COLOUR and a DIRECTION, and both are carried: the multiply is per CHANNEL and
|
|
20
|
+
* the factor is MapBox's own ground radiance (`groundRadiance` below),
|
|
21
|
+
*
|
|
22
|
+
* shown_c = authored_c x (emissive + (1 - emissive) x radiance_c)
|
|
23
|
+
*
|
|
24
|
+
* which is `mix(apply_lighting_ground(color), color, emissive_strength)` written out.
|
|
25
|
+
*
|
|
26
|
+
* It is still an approximation of the whole model - a 2D layer has no normal, so every surface is
|
|
27
|
+
* lit as if it faced up - but the light itself is theirs rather than a fitted proxy.
|
|
28
|
+
*/
|
|
29
|
+
/** Which mapbox emissive property lights a given CartoCSS property. */
|
|
30
|
+
const EMISSIVE_SOURCE = [
|
|
31
|
+
[/^background-/, 'background-emissive-strength'],
|
|
32
|
+
[/^shield-icon-/, 'icon-emissive-strength'],
|
|
33
|
+
[/^shield-/, 'text-emissive-strength'],
|
|
34
|
+
[/^marker-/, 'icon-emissive-strength'],
|
|
35
|
+
[/^text-/, 'text-emissive-strength'],
|
|
36
|
+
[/^line-/, 'line-emissive-strength'],
|
|
37
|
+
[/^polygon-/, 'fill-emissive-strength'],
|
|
38
|
+
[/^building-/, 'fill-extrusion-emissive-strength'],
|
|
39
|
+
];
|
|
40
|
+
/**
|
|
41
|
+
* The mapbox LAYER TYPE decides the emissive property, not the CartoCSS name it was translated to.
|
|
42
|
+
* A `circle` becomes a marker, whose `icon-emissive-strength` a circle layer never states - so it
|
|
43
|
+
* read as fully emissive and stayed identical at every preset, where gl-js lights it
|
|
44
|
+
* (circle.fragment.glsl goes through apply_lighting_with_emission_ground). A fill's OUTLINE becomes
|
|
45
|
+
* a `line-color` and was looked up against `line-emissive-strength`, which a fill layer does not
|
|
46
|
+
* state either; mapbox lights the outline with the fill's own.
|
|
47
|
+
*/
|
|
48
|
+
const EMISSIVE_BY_LAYER_TYPE = {
|
|
49
|
+
circle: 'circle-emissive-strength',
|
|
50
|
+
fill: 'fill-emissive-strength',
|
|
51
|
+
};
|
|
52
|
+
/** The emissive property a layer of this TYPE uses, when the property name alone would mislead. */
|
|
53
|
+
export function emissiveForLayerType(type) {
|
|
54
|
+
return type ? EMISSIVE_BY_LAYER_TYPE[type] ?? null : null;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* What MapBox uses when a layer states none, which is NOT one value for all of them.
|
|
58
|
+
*
|
|
59
|
+
* A LABEL is emissive by default and stays legible at night; GEOMETRY is not, and is lit like any
|
|
60
|
+
* other surface. Reading "unstated" as fully emissive left Standard's `roads-case` - which states
|
|
61
|
+
* nothing - drawing its white casing over a night map, and its trees a bright green.
|
|
62
|
+
*/
|
|
63
|
+
const EMISSIVE_DEFAULT = {
|
|
64
|
+
'text-emissive-strength': 1,
|
|
65
|
+
'icon-emissive-strength': 1,
|
|
66
|
+
'circle-emissive-strength': 0,
|
|
67
|
+
'background-emissive-strength': 0,
|
|
68
|
+
'line-emissive-strength': 0,
|
|
69
|
+
'fill-emissive-strength': 0,
|
|
70
|
+
'fill-extrusion-emissive-strength': 0,
|
|
71
|
+
'model-emissive-strength': 0,
|
|
72
|
+
};
|
|
73
|
+
/** Which of the defaults above are a LABEL's - the ones `--label-emissive` may override. */
|
|
74
|
+
const LABEL_EMISSIVE = new Set(['text-emissive-strength', 'icon-emissive-strength']);
|
|
75
|
+
export function emissiveDefault(source, labelDefault) {
|
|
76
|
+
if (source === null)
|
|
77
|
+
return null;
|
|
78
|
+
// A style with no light model of its own states no emissive anywhere, so mapbox's defaults are
|
|
79
|
+
// all it has - and theirs keep a label fully emissive, which leaves the labels sitting bright
|
|
80
|
+
// over a map that darkens around them. `--label-emissive` is how such a style says otherwise.
|
|
81
|
+
if (labelDefault !== undefined && LABEL_EMISSIVE.has(source))
|
|
82
|
+
return labelDefault;
|
|
83
|
+
return EMISSIVE_DEFAULT[source] ?? null;
|
|
84
|
+
}
|
|
85
|
+
/** A colour literal in any spelling the translator emits. None of them nest a paren. */
|
|
86
|
+
const COLOUR = /#[0-9a-fA-F]{3,8}\b|\b(?:hsla?|rgba?)\([^()]*\)/g;
|
|
87
|
+
export function emissiveProperty(cartocss) {
|
|
88
|
+
return EMISSIVE_SOURCE.find(([pattern]) => pattern.test(cartocss))?.[1] ?? null;
|
|
89
|
+
}
|
|
90
|
+
/** sRGB channels 0-1 of an HSL triple, h in degrees and s/l in percent. */
|
|
91
|
+
function hslToRgb(h, s, l) {
|
|
92
|
+
const S = Math.max(0, Math.min(1, s / 100));
|
|
93
|
+
const L = Math.max(0, Math.min(1, l / 100));
|
|
94
|
+
const c = (1 - Math.abs(2 * L - 1)) * S;
|
|
95
|
+
const hp = ((((h % 360) + 360) % 360) / 60);
|
|
96
|
+
const x = c * (1 - Math.abs((hp % 2) - 1));
|
|
97
|
+
const [r, g, b] = hp < 1 ? [c, x, 0] : hp < 2 ? [x, c, 0] : hp < 3 ? [0, c, x]
|
|
98
|
+
: hp < 4 ? [0, x, c] : hp < 5 ? [x, 0, c] : [c, 0, x];
|
|
99
|
+
const m = L - c / 2;
|
|
100
|
+
return [r + m, g + m, b + m];
|
|
101
|
+
}
|
|
102
|
+
function rgbLuminance([r, g, b]) {
|
|
103
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
104
|
+
}
|
|
105
|
+
/** A light colour as channels at luminance 1 - its chroma with its brightness divided out. */
|
|
106
|
+
function chroma(colour) {
|
|
107
|
+
const hsla = colour === null ? null : toHsla(colour);
|
|
108
|
+
if (!hsla)
|
|
109
|
+
return null;
|
|
110
|
+
const rgb = hslToRgb(hsla[0], hsla[1], hsla[2]);
|
|
111
|
+
const luminance = rgbLuminance(rgb);
|
|
112
|
+
return luminance > 0 ? [rgb[0] / luminance, rgb[1] / luminance, rgb[2] / luminance] : null;
|
|
113
|
+
}
|
|
114
|
+
const toLinear = (c) => Math.pow(c, 2.2);
|
|
115
|
+
const toSRGB = (c) => Math.pow(Math.max(0, Math.min(1, c)), 1 / 2.2);
|
|
116
|
+
/**
|
|
117
|
+
* What MapBox's own light does to a FLAT, upward-facing surface - `calculateGroundRadiance`
|
|
118
|
+
* (3d-style/render/lights.ts) with the ground normal, which is the value `apply_lighting_ground`
|
|
119
|
+
* multiplies every unlit 2D colour by.
|
|
120
|
+
*
|
|
121
|
+
* Ported rather than approximated. The proxy this replaces raised a scalar brightness to a fitted
|
|
122
|
+
* gamma and floored the colour ratio at neutral, which cost the two things that separate the
|
|
123
|
+
* presets: dawn came out 8% darker and NEUTRAL where MapBox draws it at full brightness with a
|
|
124
|
+
* fifth of its blue removed - so day and dawn looked alike - and every preset's tint was a lift
|
|
125
|
+
* only, never a subtraction.
|
|
126
|
+
*/
|
|
127
|
+
export function groundRadiance(lights) {
|
|
128
|
+
if (!lights)
|
|
129
|
+
return null;
|
|
130
|
+
const ambient = toHsla(lights.ambientColour);
|
|
131
|
+
const directional = toHsla(lights.directionalColour);
|
|
132
|
+
if (!ambient || !directional)
|
|
133
|
+
return null;
|
|
134
|
+
const scale = (colour, intensity) => hslToRgb(colour[0], colour[1], colour[2]).map((c) => toLinear(c) * intensity);
|
|
135
|
+
const amb = scale([ambient[0], ambient[1], ambient[2]], lights.ambientIntensity);
|
|
136
|
+
const dir = scale([directional[0], directional[1], directional[2]], lights.directionalIntensity);
|
|
137
|
+
const dirZ = Math.cos((lights.directionalPolar * Math.PI) / 180);
|
|
138
|
+
// The sky is brighter near the sun, and a face turned away from it loses up to 30% of the
|
|
139
|
+
// ambient. A ground normal is never turned away, so this is 1 whenever the sun is up.
|
|
140
|
+
const minFactor = 1 - 0.3 * Math.min(rgbLuminance(dir), 1);
|
|
141
|
+
const ambientDirectional = minFactor + (1 - minFactor) * Math.min(dirZ + 1, 1);
|
|
142
|
+
return [0, 1, 2].map((i) => toSRGB(amb[i] * ambientDirectional + dir[i] * Math.max(0, dirZ)));
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* The per-channel factor a property's colours are multiplied by, or null when nothing has to
|
|
146
|
+
* change - a fully emissive layer, or a scene with no lights to go by.
|
|
147
|
+
*
|
|
148
|
+
* MapBox's `mix(apply_lighting_ground(color), color, emissive_strength)`, exactly: a self-lit
|
|
149
|
+
* surface keeps its authored colour under any light, which is what stops a road casing turning
|
|
150
|
+
* blue at night, and an unlit one is the radiance.
|
|
151
|
+
*/
|
|
152
|
+
export function lightingFactor(emissive, radiance) {
|
|
153
|
+
if (radiance === null || typeof emissive !== 'number')
|
|
154
|
+
return null;
|
|
155
|
+
const strength = Math.max(0, Math.min(1, emissive));
|
|
156
|
+
if (strength >= 1)
|
|
157
|
+
return null;
|
|
158
|
+
const factor = radiance.map((c) => Math.max(0, Math.min(1, strength + (1 - strength) * c)));
|
|
159
|
+
return factor.every((f) => f >= 0.999) ? null : factor;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Every colour in a declaration value, multiplied per CHANNEL by the light.
|
|
163
|
+
*
|
|
164
|
+
* A uniform factor is a plain darkening; a coloured one also moves the hue. Note that scaling every
|
|
165
|
+
* channel by the same k does NOT keep the HSL saturation - the number drops as the colour darkens,
|
|
166
|
+
* while the channel RATIOS, which are what the eye reads as hue and chroma, are untouched.
|
|
167
|
+
*/
|
|
168
|
+
export function applyLighting(value, factor) {
|
|
169
|
+
return value.replace(COLOUR, (raw) => {
|
|
170
|
+
const hsla = toHsla(raw);
|
|
171
|
+
if (!hsla)
|
|
172
|
+
return raw;
|
|
173
|
+
const [r, g, b] = hslToRgb(hsla[0], hsla[1], hsla[2]);
|
|
174
|
+
const [h, s, l] = rgbToHslTriple([r * factor[0], g * factor[1], b * factor[2]]);
|
|
175
|
+
return fromHsla(h, s, l, hsla[3]);
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
/** Back to the HSL the palette is written in. */
|
|
179
|
+
function rgbToHslTriple([r, g, b]) {
|
|
180
|
+
const max = Math.max(r, g, b);
|
|
181
|
+
const min = Math.min(r, g, b);
|
|
182
|
+
const l = (max + min) / 2;
|
|
183
|
+
const d = max - min;
|
|
184
|
+
if (d === 0)
|
|
185
|
+
return [0, 0, l * 100];
|
|
186
|
+
const s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
187
|
+
const h = max === r ? ((g - b) / d + (g < b ? 6 : 0))
|
|
188
|
+
: max === g ? ((b - r) / d + 2)
|
|
189
|
+
: ((r - g) / d + 4);
|
|
190
|
+
return [h * 60, s * 100, l * 100];
|
|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