@mapbox/mapbox-gl-style-spec
Advanced tools
Comparing version 14.0.0-beta.2 to 14.0.0-beta.3
27
diff.js
@@ -5,3 +5,3 @@ // @flow | ||
import type {StyleSpecification, SourceSpecification, LayerSpecification} from './types.js'; | ||
import type {StyleSpecification, ImportSpecification, SourceSpecification, LayerSpecification} from './types.js'; | ||
@@ -135,3 +135,13 @@ type Sources = { [string]: SourceSpecification }; | ||
*/ | ||
setProjection: 'setProjection' | ||
setProjection: 'setProjection', | ||
/* | ||
* { command: 'addImport', args: [importProperties] } | ||
*/ | ||
addImport: 'addImport', | ||
/* | ||
* { command: 'removeImport', args: [importId] } | ||
*/ | ||
removeImport: 'removeImport' | ||
}; | ||
@@ -340,2 +350,13 @@ | ||
function diffImports(before: Array<ImportSpecification> = [], after: Array<ImportSpecification> = [], commands: Array<Command>) { | ||
// no diff for the imports, must remove then add | ||
for (const beforeImport of before) { | ||
commands.push({command: operations.removeImport, args: [beforeImport.id]}); | ||
} | ||
for (const afterImport of after) { | ||
commands.push({command: operations.addImport, args: [afterImport]}); | ||
} | ||
} | ||
/** | ||
@@ -451,2 +472,4 @@ * Diff two stylesheet | ||
// Handle changes to `imports` | ||
diffImports(before.imports, after.imports, commands); | ||
} catch (e) { | ||
@@ -453,0 +476,0 @@ // fall back to setStyle |
@@ -56,3 +56,4 @@ // @flow | ||
transformMat4<T: Vec4>(T, Vec4, Mat4): T, | ||
normalize<T: Vec4>(T, Vec4): T | ||
normalize<T: Vec4>(T, Vec4): T, | ||
dot(Vec4, Vec4): number, | ||
}; | ||
@@ -59,0 +60,0 @@ |
// @flow strict | ||
declare module "gl" { | ||
declare function gl(width: number, height: number, attributes: WebGLContextAttributes): WebGLRenderingContext; | ||
declare function gl(width: number, height: number, attributes: WebGLContextAttributes): WebGL2RenderingContext; | ||
declare module.exports: typeof gl; | ||
} |
{ | ||
"name": "@mapbox/mapbox-gl-style-spec", | ||
"description": "a specification for mapbox gl styles", | ||
"version": "14.0.0-beta.2", | ||
"version": "14.0.0-beta.3", | ||
"author": "Mapbox", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
10
types.js
@@ -111,3 +111,4 @@ // @flow | ||
"horizon-blend"?: PropertyValueSpecification<number>, | ||
"star-intensity"?: PropertyValueSpecification<number> | ||
"star-intensity"?: PropertyValueSpecification<number>, | ||
"vertical-range"?: PropertyValueSpecification<[number, number]> | ||
|} | ||
@@ -357,2 +358,3 @@ | ||
"symbol-z-order"?: PropertyValueSpecification<"auto" | "viewport-y" | "source">, | ||
"symbol-z-elevate"?: PropertyValueSpecification<boolean>, | ||
"icon-allow-overlap"?: PropertyValueSpecification<boolean>, | ||
@@ -503,3 +505,4 @@ "icon-ignore-placement"?: PropertyValueSpecification<boolean>, | ||
"fill-extrusion-vertical-scale"?: PropertyValueSpecification<number>, | ||
"fill-extrusion-rounded-roof"?: PropertyValueSpecification<boolean> | ||
"fill-extrusion-rounded-roof"?: PropertyValueSpecification<boolean>, | ||
"fill-extrusion-cutoff-fade-range"?: ExpressionSpecification | ||
|} | ||
@@ -586,3 +589,4 @@ |} | ||
"model-roughness"?: DataDrivenPropertyValueSpecification<number>, | ||
"model-height-based-emissive-strength-multiplier"?: DataDrivenPropertyValueSpecification<[number, number, number, number, number]> | ||
"model-height-based-emissive-strength-multiplier"?: DataDrivenPropertyValueSpecification<[number, number, number, number, number]>, | ||
"model-cutoff-fade-range"?: ExpressionSpecification | ||
|} | ||
@@ -589,0 +593,0 @@ |} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3977882
138
61708