From b743b6ea3bb178dad3492e5b0f1f3f8ff6e6a231 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Mon, 10 Oct 2016 11:42:29 -0400 Subject: [PATCH] Color interpolation (#3245) Pass-through function interpolation property to mapbox-gl-function for customizable color space interpolation --- debug/color_spaces.html | 141 ++++++++++++++++++++++++++++++++++ js/style/style_declaration.js | 3 +- package.json | 2 +- 3 files changed, 144 insertions(+), 2 deletions(-) create mode 100644 debug/color_spaces.html diff --git a/debug/color_spaces.html b/debug/color_spaces.html new file mode 100644 index 00000000000..065b32c88da --- /dev/null +++ b/debug/color_spaces.html @@ -0,0 +1,141 @@ + + + + Mapbox GL JS debug page + + + + + + + + +
+
+ +
+ + + + + + + + + + diff --git a/js/style/style_declaration.js b/js/style/style_declaration.js index 9ab8b2fe3e9..3a148bdea97 100644 --- a/js/style/style_declaration.js +++ b/js/style/style_declaration.js @@ -42,7 +42,8 @@ function StyleDeclaration(reference, value) { this.calculateInterpolationT = MapboxGLFunction.interpolated({ stops: interpolationAmountStops, - base: value.base + base: value.base, + colorSpace: value.colorSpace }); } } diff --git a/package.json b/package.json index bc354b3b1c4..51ce367f608 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "geojson-vt": "^2.4.0", "gl-matrix": "^2.3.1", "grid-index": "^1.0.0", - "mapbox-gl-function": "^1.3.0", + "mapbox-gl-function": "mapbox/mapbox-gl-function#111a2b442be0689a65f5818dd2603c9b06962be0", "mapbox-gl-shaders": "mapbox/mapbox-gl-shaders#44b65f8090a74cbb0319664d010b8d8a8a1512b0", "mapbox-gl-style-spec": "mapbox/mapbox-gl-style-spec#7d330d2abf1775abc95ab8b889089cf5ff579357", "mapbox-gl-supported": "^1.2.0",