From 6288de581343faf3e37a989f19dbdf89fa563c34 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 18 Aug 2019 16:51:27 +0900 Subject: [PATCH] Fix #5291 --- src/client/app/common/scripts/room/room.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/app/common/scripts/room/room.ts b/src/client/app/common/scripts/room/room.ts index 2a06f5bc5..b2e2c300b 100644 --- a/src/client/app/common/scripts/room/room.ts +++ b/src/client/app/common/scripts/room/room.ts @@ -210,7 +210,10 @@ export class Room { //#region Avatar const avatarUrl = user.avatarUrl; - const iconTexture = new THREE.TextureLoader().load(avatarUrl); + const textureLoader = new THREE.TextureLoader(); + textureLoader.crossOrigin = 'anonymous'; + + const iconTexture = textureLoader.load(avatarUrl); iconTexture.wrapS = THREE.RepeatWrapping; iconTexture.wrapT = THREE.RepeatWrapping; iconTexture.anisotropy = 16; @@ -467,6 +470,7 @@ export class Room { }); const img = new Image(); + img.crossOrigin = 'anonymous'; img.onload = () => { const uvInfo = def.texture[t].uv;