more sensible mapping for the multiple values

This commit is contained in:
Stuart Lynn 2015-09-09 09:57:50 -04:00
parent 35e1044f1a
commit b9bcb1b33f

View File

@ -338,7 +338,9 @@ var Filters = require('./torque_filters');
var pixelIndex = tile.timeIndex[step]; var pixelIndex = tile.timeIndex[step];
for(var p = 0; p < activePixels; ++p) { for(var p = 0; p < activePixels; ++p) {
var posIdx = tile.renderDataPos[pixelIndex + p]; var posIdx = tile.renderDataPos[pixelIndex + p];
var c = [tile.renderData[0][pixelIndex + p], tile.renderData[1][pixelIndex + p]]
var c =tile.renderData.map(function(r){ return r[pixelIndex + p]})
if (c) { if (c) {
var x = tile.x[posIdx]; var x = tile.x[posIdx];
var y = tileMax - tile.y[posIdx]; var y = tileMax - tile.y[posIdx];