diff --git a/Build/Demo.data b/Build/Demo.data index 1012ea6..5c3a466 100644 Binary files a/Build/Demo.data and b/Build/Demo.data differ diff --git a/Build/Demo.wasm b/Build/Demo.wasm index 5730989..8c5efdf 100644 Binary files a/Build/Demo.wasm and b/Build/Demo.wasm differ diff --git a/MyLoader.js b/MyLoader.js index 9105d7b..a157e79 100644 --- a/MyLoader.js +++ b/MyLoader.js @@ -241,6 +241,7 @@ function createUnityInstance(canvas, config, onProgress) { } else if (message.indexOf("Invalid array buffer length") != -1 || message.indexOf("Invalid typed array length") != -1 || message.indexOf("out of memory") != -1 || message.indexOf("could not allocate memory") != -1) { message = "The browser could not allocate enough memory for the WebGL content. If you are the developer of this content, try allocating less memory to your WebGL build in the WebGL player settings."; } + alert(message); errorHandler.didShowErrorMessage = true; } @@ -291,6 +292,14 @@ function createUnityInstance(canvas, config, onProgress) { } var totalProgress = started ? (started - unfinishedNonComputable - (total ? computable * (total - loaded) / total : 0)) / started : 0; onProgress(0.9 * totalProgress); + + var LBar = document.getElementById("LoadBar"); +var CBar = document.getElementById("LoadContainer"); +LBar.style.width = totalProgress*200+"px"; +if(totalProgress == 1){ + CBar.style.display="none"; +} + } Module.XMLHttpRequest = function () { diff --git a/index.html b/index.html index d08311b..f626b5e 100644 --- a/index.html +++ b/index.html @@ -25,10 +25,14 @@
press F or click here to toggle fullscreen
source code on github
-template by dom / @zerstoerer
-