Use a function to get the value of the gradient

This commit is contained in:
Frederic Junod
2020-01-06 10:52:16 +01:00
parent 6d092cf1a6
commit 5a1921d7bd
+3 -1
View File
@@ -294,7 +294,9 @@ class Heatmap extends VectorLayer {
gl_FragColor.rgb *= gl_FragColor.a; gl_FragColor.rgb *= gl_FragColor.a;
}`, }`,
uniforms: { uniforms: {
u_gradientTexture: this.gradient_ u_gradientTexture: function() {
return this.gradient_;
}.bind(this)
} }
} }
] ]