From 5a1921d7bd2dcec456a4aa43c38cbdb5b6e09712 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 6 Jan 2020 10:52:16 +0100 Subject: [PATCH] Use a function to get the value of the gradient --- src/ol/layer/Heatmap.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ol/layer/Heatmap.js b/src/ol/layer/Heatmap.js index 646777a0d3..eb7abdf0ad 100644 --- a/src/ol/layer/Heatmap.js +++ b/src/ol/layer/Heatmap.js @@ -294,7 +294,9 @@ class Heatmap extends VectorLayer { gl_FragColor.rgb *= gl_FragColor.a; }`, uniforms: { - u_gradientTexture: this.gradient_ + u_gradientTexture: function() { + return this.gradient_; + }.bind(this) } } ]