@mapbox/mapbox-gl-style-spec 14.18.0 → 14.19.0-beta.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/dist/index.cjs +88 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.es.js +88 -6
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/reference/v8.json +85 -3
- package/types.ts +10 -3
- package/util/color.ts +5 -3
package/package.json
CHANGED
package/reference/v8.json
CHANGED
|
@@ -1904,6 +1904,30 @@
|
|
|
1904
1904
|
"interpolated": false
|
|
1905
1905
|
},
|
|
1906
1906
|
"property-type": "data-constant"
|
|
1907
|
+
},
|
|
1908
|
+
"visibility": {
|
|
1909
|
+
"type": "enum",
|
|
1910
|
+
"values": {
|
|
1911
|
+
"visible": {
|
|
1912
|
+
"doc": "The layer is shown."
|
|
1913
|
+
},
|
|
1914
|
+
"none": {
|
|
1915
|
+
"doc": "The layer is not shown."
|
|
1916
|
+
}
|
|
1917
|
+
},
|
|
1918
|
+
"default": "visible",
|
|
1919
|
+
"doc": "Whether this layer is displayed.",
|
|
1920
|
+
"sdk-support": {
|
|
1921
|
+
"basic functionality": {
|
|
1922
|
+
"js": "3.18.0",
|
|
1923
|
+
"android": "11.18.0",
|
|
1924
|
+
"ios": "11.18.0"
|
|
1925
|
+
}
|
|
1926
|
+
},
|
|
1927
|
+
"expression": {
|
|
1928
|
+
"interpolated": false
|
|
1929
|
+
},
|
|
1930
|
+
"property-type": "data-constant"
|
|
1907
1931
|
}
|
|
1908
1932
|
},
|
|
1909
1933
|
"layout_fill": {
|
|
@@ -2814,6 +2838,38 @@
|
|
|
2814
2838
|
]
|
|
2815
2839
|
},
|
|
2816
2840
|
"property-type": "data-constant"
|
|
2841
|
+
},
|
|
2842
|
+
"line-elevation-ground-scale": {
|
|
2843
|
+
"type": "number",
|
|
2844
|
+
"default": 0,
|
|
2845
|
+
"minimum": 0,
|
|
2846
|
+
"maximum": 1,
|
|
2847
|
+
"doc": "Controls how much the elevation of lines with `line-elevation-reference` set to `sea` scales with terrain exaggeration. A value of 0 keeps the line at a fixed altitude above sea level. A value of 1 scales the elevation proportionally with terrain exaggeration.",
|
|
2848
|
+
"sdk-support": {
|
|
2849
|
+
"basic functionality": {
|
|
2850
|
+
"js": "3.19.0",
|
|
2851
|
+
"android": "11.19.0",
|
|
2852
|
+
"ios": "11.19.0"
|
|
2853
|
+
},
|
|
2854
|
+
"data-driven styling": {
|
|
2855
|
+
"js": "3.19.0",
|
|
2856
|
+
"android": "11.19.0",
|
|
2857
|
+
"ios": "11.19.0"
|
|
2858
|
+
}
|
|
2859
|
+
},
|
|
2860
|
+
"expression": {
|
|
2861
|
+
"interpolated": true,
|
|
2862
|
+
"parameters": [
|
|
2863
|
+
"zoom",
|
|
2864
|
+
"feature",
|
|
2865
|
+
"line-progress"
|
|
2866
|
+
]
|
|
2867
|
+
},
|
|
2868
|
+
"requires": [
|
|
2869
|
+
"line-z-offset"
|
|
2870
|
+
],
|
|
2871
|
+
"transition": true,
|
|
2872
|
+
"property-type": "data-driven"
|
|
2817
2873
|
}
|
|
2818
2874
|
},
|
|
2819
2875
|
"layout_symbol": {
|
|
@@ -10363,7 +10419,7 @@
|
|
|
10363
10419
|
},
|
|
10364
10420
|
"raster-elevation": {
|
|
10365
10421
|
"type": "number",
|
|
10366
|
-
"doc": "
|
|
10422
|
+
"doc": "Defines an uniform elevation from the base specified in raster-elevation-reference, in meters.",
|
|
10367
10423
|
"default": 0,
|
|
10368
10424
|
"minimum": 0,
|
|
10369
10425
|
"transition": true,
|
|
@@ -10382,6 +10438,32 @@
|
|
|
10382
10438
|
]
|
|
10383
10439
|
},
|
|
10384
10440
|
"property-type": "data-constant"
|
|
10441
|
+
},
|
|
10442
|
+
"raster-elevation-reference": {
|
|
10443
|
+
"type": "enum",
|
|
10444
|
+
"doc": "Selects the base of raster-elevation.",
|
|
10445
|
+
"values": {
|
|
10446
|
+
"sea": {
|
|
10447
|
+
"doc": "Use this mode to elevate raster layers relative to the sea level."
|
|
10448
|
+
},
|
|
10449
|
+
"ground": {
|
|
10450
|
+
"doc": "Use this mode to elevate raster layers relative to the ground's height below them."
|
|
10451
|
+
}
|
|
10452
|
+
},
|
|
10453
|
+
"default": "sea",
|
|
10454
|
+
"transition": false,
|
|
10455
|
+
"experimental": true,
|
|
10456
|
+
"sdk-support": {
|
|
10457
|
+
"basic functionality": {
|
|
10458
|
+
"js": "3.19.0",
|
|
10459
|
+
"android": "11.19.0",
|
|
10460
|
+
"ios": "11.19.0"
|
|
10461
|
+
}
|
|
10462
|
+
},
|
|
10463
|
+
"expression": {
|
|
10464
|
+
"interpolated": false
|
|
10465
|
+
},
|
|
10466
|
+
"property-type": "data-constant"
|
|
10385
10467
|
}
|
|
10386
10468
|
},
|
|
10387
10469
|
"paint_raster-particle": {
|
|
@@ -10513,7 +10595,7 @@
|
|
|
10513
10595
|
},
|
|
10514
10596
|
"raster-particle-elevation": {
|
|
10515
10597
|
"type": "number",
|
|
10516
|
-
"doc": "
|
|
10598
|
+
"doc": "Defines an uniform elevation from sea level, in meters.",
|
|
10517
10599
|
"default": 0,
|
|
10518
10600
|
"minimum": 0,
|
|
10519
10601
|
"transition": true,
|
|
@@ -11405,7 +11487,7 @@
|
|
|
11405
11487
|
},
|
|
11406
11488
|
"model-elevation-reference": {
|
|
11407
11489
|
"type": "enum",
|
|
11408
|
-
"doc": "Selects the base of the model. Some modes might require precomputed elevation data in the tileset.",
|
|
11490
|
+
"doc": "Selects the base of the model. Some modes might require precomputed elevation data in the tileset. When using vector tiled source as the model layer source and hd-road-markup elevation reference, this property acts as layout property and elevation is evaluated only in tile loading time.",
|
|
11409
11491
|
"values": {
|
|
11410
11492
|
"sea": {
|
|
11411
11493
|
"doc": "Elevated rendering is enabled. Use this mode to elevate models relative to the sea level."
|
package/types.ts
CHANGED
|
@@ -716,7 +716,9 @@ export type LineLayerSpecification = {
|
|
|
716
716
|
/**
|
|
717
717
|
* @experimental This property is experimental and subject to change in future versions.
|
|
718
718
|
*/
|
|
719
|
-
"line-width-unit"?: PropertyValueSpecification<"pixels" | "meters"
|
|
719
|
+
"line-width-unit"?: PropertyValueSpecification<"pixels" | "meters">,
|
|
720
|
+
"line-elevation-ground-scale"?: DataDrivenPropertyValueSpecification<number>,
|
|
721
|
+
"line-elevation-ground-scale-transition"?: TransitionSpecification
|
|
720
722
|
},
|
|
721
723
|
"paint"?: {
|
|
722
724
|
"line-opacity"?: DataDrivenPropertyValueSpecification<number>,
|
|
@@ -1246,7 +1248,11 @@ export type RasterLayerSpecification = {
|
|
|
1246
1248
|
* @experimental This property is experimental and subject to change in future versions.
|
|
1247
1249
|
*/
|
|
1248
1250
|
"raster-elevation"?: PropertyValueSpecification<number>,
|
|
1249
|
-
"raster-elevation-transition"?: TransitionSpecification
|
|
1251
|
+
"raster-elevation-transition"?: TransitionSpecification,
|
|
1252
|
+
/**
|
|
1253
|
+
* @experimental This property is experimental and subject to change in future versions.
|
|
1254
|
+
*/
|
|
1255
|
+
"raster-elevation-reference"?: "sea" | "ground" | ExpressionSpecification
|
|
1250
1256
|
},
|
|
1251
1257
|
/**
|
|
1252
1258
|
* @experimental This property is experimental and subject to change in future versions.
|
|
@@ -1533,7 +1539,8 @@ export type ClipLayerSpecification = {
|
|
|
1533
1539
|
"filter"?: FilterSpecification,
|
|
1534
1540
|
"layout"?: {
|
|
1535
1541
|
"clip-layer-types"?: Array<"model" | "symbol"> | ExpressionSpecification,
|
|
1536
|
-
"clip-layer-scope"?: Array<string> | ExpressionSpecification
|
|
1542
|
+
"clip-layer-scope"?: Array<string> | ExpressionSpecification,
|
|
1543
|
+
"visibility"?: "visible" | "none" | ExpressionSpecification
|
|
1537
1544
|
},
|
|
1538
1545
|
/**
|
|
1539
1546
|
* @experimental This property is experimental and subject to change in future versions.
|
package/util/color.ts
CHANGED
|
@@ -129,6 +129,11 @@ export abstract class RenderColor {
|
|
|
129
129
|
b = b * (N - 1);
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
+
// Clamp to valid range [0, N-1] to prevent out-of-bounds access
|
|
133
|
+
r = Math.max(0, Math.min(N - 1, r));
|
|
134
|
+
g = Math.max(0, Math.min(N - 1, g));
|
|
135
|
+
b = Math.max(0, Math.min(N - 1, b));
|
|
136
|
+
|
|
132
137
|
// Determine boundary values for the cube the color is in.
|
|
133
138
|
const r0 = Math.floor(r);
|
|
134
139
|
const g0 = Math.floor(g);
|
|
@@ -151,9 +156,6 @@ export abstract class RenderColor {
|
|
|
151
156
|
const i5 = (r1 + g0 * N2 + b1 * N) * 4;
|
|
152
157
|
const i6 = (r1 + g1 * N2 + b0 * N) * 4;
|
|
153
158
|
const i7 = (r1 + g1 * N2 + b1 * N) * 4;
|
|
154
|
-
if (i0 < 0 || i7 >= data.length) {
|
|
155
|
-
throw new Error("out of range");
|
|
156
|
-
}
|
|
157
159
|
|
|
158
160
|
// Trilinear interpolation.
|
|
159
161
|
this.r = lerp(
|