From 43e905b8d895eef9af38bef2aaa436d4bd7e1904 Mon Sep 17 00:00:00 2001 From: Chris Price <price.c@gmail.com> Date: Tue, 20 May 2014 16:29:34 +0100 Subject: [PATCH] Add crossOrigin attribute to imgs to prevent canvas tainted errors --- js/Sprite.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/Sprite.js b/js/Sprite.js index 4fb17d2..d14aa7b 100644 --- a/js/Sprite.js +++ b/js/Sprite.js @@ -140,7 +140,10 @@ Sprite.prototype.attach = function(scene) { }); 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];