makes check for image-filters in all layers

This commit is contained in:
Francisco Dans 2015-02-10 11:23:12 +01:00
parent f0b7f09140
commit 45a3b57946

View File

@ -323,7 +323,7 @@ var filters = require('./torque_filters');
if (typeof self._icons.itemsToLoad === 'undefined'){
this._icons.itemsToLoad = img_names.length;
}
if (typeof self._shader.getLayers()[1].shader["image-filters"] !== "undefined"){
if (self._shader.getLayers().some(function(layer){return typeof layer.shader["image-filters"] !== "undefined"})){
new_img.crossOrigin = 'Anonymous';
}
new_img.onload = function(e){