doesn't colorize is alpha is 0 or less

This commit is contained in:
Francisco Dans 2015-04-29 16:24:30 +02:00
parent bd479fc507
commit ee332d0762

View File

@ -275,7 +275,7 @@ BallRenderer.prototype = {
for (var i = 0, len = this.pointLayer.length; i< len; i+=4){ for (var i = 0, len = this.pointLayer.length; i< len; i+=4){
alpha = this.pointLayer[i+3] * 4; // get gradient color from opacity value alpha = this.pointLayer[i+3] * 4; // get gradient color from opacity value
if (alpha) { if (alpha>0) {
this.heatmapLayer[i] = grad[alpha]; // R this.heatmapLayer[i] = grad[alpha]; // R
this.heatmapLayer[i + 1] = grad[alpha + 1]; // G this.heatmapLayer[i + 1] = grad[alpha + 1]; // G
this.heatmapLayer[i + 2] = grad[alpha + 2]; // B this.heatmapLayer[i + 2] = grad[alpha + 2]; // B