Add crossOrigin attribute to imgs to prevent canvas tainted errors

This commit is contained in:
Chris Price 2014-05-20 16:29:34 +01:00
parent bc9e937b06
commit 43e905b8d8

View file

@ -140,7 +140,10 @@ Sprite.prototype.attach = function(scene) {
}); });
scene.append($(sprite.textures[c])); scene.append($(sprite.textures[c]));
}) })
.attr('src', io.asset_base + this.costumes[c].baseLayerMD5 + io.asset_suffix); .attr({
'crossOrigin': 'annonymous',
'src': io.asset_base + this.costumes[c].baseLayerMD5 + io.asset_suffix
});
} }
this.mesh = this.textures[this.currentCostumeIndex]; this.mesh = this.textures[this.currentCostumeIndex];