change crossOrigin to anonymous, close #17

This commit is contained in:
yushijinhun 2018-03-03 22:04:10 +08:00
parent 99c21b4dc8
commit d7e7ae3d99
No known key found for this signature in database
GPG Key ID: 5BC167F73EA558E4
1 changed files with 2 additions and 2 deletions

View File

@ -94,7 +94,7 @@ class SkinViewer {
this.scene.add(this.playerObject);
// texture loading
this.skinImg.crossOrigin = "";
this.skinImg.crossOrigin = "anonymous";
this.skinImg.onerror = () => console.error("Failed loading " + this.skinImg.src);
this.skinImg.onload = () => {
let isOldFormat = false;
@ -129,7 +129,7 @@ class SkinViewer {
this.playerObject.skin.visible = true;
};
this.capeImg.crossOrigin = "";
this.capeImg.crossOrigin = "anonymous";
this.capeImg.onerror = () => console.error("Failed loading " + this.capeImg.src);
this.capeImg.onload = () => {
let isOldFormat = false;