@mapbox/mapbox-gl-style-spec 14.18.0 → 14.18.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 +28 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +28 -4
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/reference/v8.json +25 -1
- package/types.ts +2 -1
- 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": {
|
|
@@ -11405,7 +11429,7 @@
|
|
|
11405
11429
|
},
|
|
11406
11430
|
"model-elevation-reference": {
|
|
11407
11431
|
"type": "enum",
|
|
11408
|
-
"doc": "Selects the base of the model. Some modes might require precomputed elevation data in the tileset.",
|
|
11432
|
+
"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
11433
|
"values": {
|
|
11410
11434
|
"sea": {
|
|
11411
11435
|
"doc": "Elevated rendering is enabled. Use this mode to elevate models relative to the sea level."
|
package/types.ts
CHANGED
|
@@ -1533,7 +1533,8 @@ export type ClipLayerSpecification = {
|
|
|
1533
1533
|
"filter"?: FilterSpecification,
|
|
1534
1534
|
"layout"?: {
|
|
1535
1535
|
"clip-layer-types"?: Array<"model" | "symbol"> | ExpressionSpecification,
|
|
1536
|
-
"clip-layer-scope"?: Array<string> | ExpressionSpecification
|
|
1536
|
+
"clip-layer-scope"?: Array<string> | ExpressionSpecification,
|
|
1537
|
+
"visibility"?: "visible" | "none" | ExpressionSpecification
|
|
1537
1538
|
},
|
|
1538
1539
|
/**
|
|
1539
1540
|
* @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(
|