Browse Source

force crossorign in image loading (prevent nwjs error)

ncannasse 6 years ago
parent
commit
19d76e2343
1 changed files with 1 additions and 1 deletions
  1. 1 1
      hide/comp/Scene.hx

+ 1 - 1
hide/comp/Scene.hx

@@ -199,7 +199,7 @@ class Scene extends Component implements h3d.IDrawable {
 			return;
 		}
 		var path = ide.getPath(img.entry.path);
-		var img = new Element('<img src="file://$path"/>');
+		var img = new Element('<img src="file://$path" crossorigin="anonymous"/>');
 		function onLoaded() {
 			setCurrent();
 			var bmp : js.html.ImageElement = cast img[0];