Darok commited on
Commit
0747a29
1 Parent(s): c2af677

Upload 15 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ Build/WebFeatherless.data filter=lfs diff=lfs merge=lfs -text
Build/WebFeatherless.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f984902db4dcaff300ebe64d9ab67cafa328bd5d117f4cb6e26ec876344f2ad
3
+ size 8116611
Build/WebFeatherless.framework.js ADDED
The diff for this file is too large to render. See raw diff
 
Build/WebFeatherless.loader.js ADDED
@@ -0,0 +1 @@
 
 
1
+ function createUnityInstance(t,r,d){function i(e,t){if(!i.aborted&&r.showBanner)return"error"==t&&(i.aborted=!0),r.showBanner(e,t);switch(t){case"error":console.error(e);break;case"warning":console.warn(e);break;default:console.log(e)}}function n(e){var t=e.reason||e.error,r=t?t.toString():e.message||e.reason||"",n=t&&t.stack?t.stack.toString():"";(r+="\n"+(n=n.startsWith(r)?n.substring(r.length):n).trim())&&c.stackTraceRegExp&&c.stackTraceRegExp.test(r)&&C(r,e.filename||t&&(t.fileName||t.sourceURL)||"",e.lineno||t&&(t.lineNumber||t.line)||0)}function e(e,t,r){var n=e[t];void 0!==n&&n||(console.warn('Config option "'+t+'" is missing or empty. Falling back to default value: "'+r+'". Consider updating your WebGL template to include the missing config option.'),e[t]=r)}d=d||function(){};var o,c={canvas:t,webglContextAttributes:{preserveDrawingBuffer:!1,powerPreference:2},cacheControl:function(e){return e==c.dataUrl?"must-revalidate":"no-store"},streamingAssetsUrl:"StreamingAssets",downloadProgress:{},deinitializers:[],intervals:{},setInterval:function(e,t){e=window.setInterval(e,t);return this.intervals[e]=!0,e},clearInterval:function(e){delete this.intervals[e],window.clearInterval(e)},preRun:[],postRun:[],print:function(e){console.log(e)},printErr:function(e){console.error(e),"string"==typeof e&&-1!=e.indexOf("wasm streaming compile failed")&&(-1!=e.toLowerCase().indexOf("mime")?i('HTTP Response Header "Content-Type" configured incorrectly on the server for file '+c.codeUrl+' , should be "application/wasm". Startup time performance will suffer.',"warning"):i('WebAssembly streaming compilation failed! This can happen for example if "Content-Encoding" HTTP header is incorrectly enabled on the server for file '+c.codeUrl+", but the file is not pre-compressed on disk (or vice versa). Check the Network tab in browser Devtools to debug server header configuration.","warning"))},locateFile:function(e){return"build.wasm"==e?this.codeUrl:e},disabledCanvasEvents:["contextmenu","dragstart"]};for(o in e(r,"companyName","Unity"),e(r,"productName","WebGL Player"),e(r,"productVersion","1.0"),r)c[o]=r[o];c.streamingAssetsUrl=new URL(c.streamingAssetsUrl,document.URL).href;var a=c.disabledCanvasEvents.slice();function s(e){e.preventDefault()}a.forEach(function(e){t.addEventListener(e,s)}),window.addEventListener("error",n),window.addEventListener("unhandledrejection",n),c.deinitializers.push(function(){for(var e in c.disableAccessToMediaDevices(),a.forEach(function(e){t.removeEventListener(e,s)}),window.removeEventListener("error",n),window.removeEventListener("unhandledrejection",n),c.intervals)window.clearInterval(e);c.intervals={}}),c.QuitCleanup=function(){for(var e=0;e<c.deinitializers.length;e++)c.deinitializers[e]();c.deinitializers=[],"function"==typeof c.onQuit&&c.onQuit()};var u,l,h,f,p,g,m,b,y="",v="",w=(document.addEventListener("webkitfullscreenchange",function(e){document.webkitCurrentFullScreenElement===t?t.style.width&&(y=t.style.width,v=t.style.height,t.style.width="100%",t.style.height="100%"):y&&(t.style.width=y,t.style.height=v,v=y="")}),{Module:c,SetFullscreen:function(){if(c.SetFullscreen)return c.SetFullscreen.apply(c,arguments);c.print("Failed to set Fullscreen mode: Player not loaded yet.")},SendMessage:function(){if(c.SendMessage)return c.SendMessage.apply(c,arguments);c.print("Failed to execute SendMessage: Player not loaded yet.")},Quit:function(){return new Promise(function(e,t){c.shouldQuit=!0,c.onQuit=e})}});function C(e,t,r){-1==e.indexOf("fullscreen error")&&(c.startupErrorHandler?c.startupErrorHandler(e,t,r):c.errorHandler&&c.errorHandler(e,t,r)||(console.log("Invoking error handler due to\n"+e),"function"==typeof dump&&dump("Invoking error handler due to\n"+e),C.didShowErrorMessage||(-1!=(e="An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:\n"+e).indexOf("DISABLE_EXCEPTION_CATCHING")?e="An exception has occurred, but exception handling has been disabled in this build. If you are the developer of this content, enable exceptions in your project WebGL player settings to be able to catch the exception or see the stack trace.":-1!=e.indexOf("Cannot enlarge memory arrays")?e="Out of memory. If you are the developer of this content, try allocating more memory to your WebGL build in the WebGL player settings.":-1==e.indexOf("Invalid array buffer length")&&-1==e.indexOf("Invalid typed array length")&&-1==e.indexOf("out of memory")&&-1==e.indexOf("could not allocate memory")||(e="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(e),C.didShowErrorMessage=!0)))}function x(e,t){if("symbolsUrl"!=e){var r=c.downloadProgress[e],n=(r=r||(c.downloadProgress[e]={started:!1,finished:!1,lengthComputable:!1,total:0,loaded:0}),"object"!=typeof t||"progress"!=t.type&&"load"!=t.type||(r.started||(r.started=!0,r.lengthComputable=t.lengthComputable),r.total=t.total,r.loaded=t.loaded,"load"==t.type&&(r.finished=!0)),0),o=0,a=0,s=0,i=0;for(e in c.downloadProgress){if(!(r=c.downloadProgress[e]).started)return;a++,r.lengthComputable?(n+=r.loaded,o+=r.total,s++):r.finished||i++}d(.9*(a?(a-i-(o?s*(o-n)/o:0))/a:0))}}function S(){var o=this;o.isConnected=new Promise(function(t,r){try{function n(){o.openDBTimeout&&(clearTimeout(o.openDBTimeout),o.openDBTimeout=null)}o.openDBTimeout=setTimeout(function(){void 0===o.database&&r(new Error("Could not connect to database: Timeout."))},2e3);var e=f.open(u.name,u.version);e.onupgradeneeded=function(e){var t;(e=(e=e).target.result).objectStoreNames.contains(h.name)||e.createObjectStore(h.name),e.objectStoreNames.contains(l.name)||(t=e.createObjectStore(l.name,{keyPath:"url"}),["version","company","product","updated","revalidated","accessed"].forEach(function(e){t.createIndex(e,e)}))},e.onsuccess=function(e){n(),o.database=e.target.result,t()},e.onerror=function(e){n(),o.database=null,r(new Error("Could not connect to database."))}}catch(e){n(),o.database=null,r(new Error("Could not connect to database."))}})}function T(e){console.log("[UnityCache] "+e)}function E(e){return E.link=E.link||document.createElement("a"),E.link.href=e,E.link.href}function k(t){t=t||{},this.headers=new Headers,Object.keys(t.headers).forEach(function(e){this.headers.set(e,t.headers[e])}.bind(this)),this.redirected=t.redirected,this.status=t.status,this.statusText=t.statusText,this.type=t.type,this.url=t.url,this.parsedBody=t.parsedBody,Object.defineProperty(this,"ok",{get:function(){return 200<=this.status&&this.status<=299}.bind(this)})}function P(e,t,r,n,o){var a={url:e,version:m.version,company:t,product:r,updated:n,revalidated:n,accessed:n,response:{headers:{}}};return o&&(o.headers.forEach(function(e,t){a.response.headers[t]=e}),["redirected","status","statusText","type","url"].forEach(function(e){a.response[e]=o[e]}),a.response.parsedBody=o.parsedBody),a}function U(){new Promise(function(a,e){var s=document.createElement("script");s.src=c.frameworkUrl,s.onload=function(){if("undefined"==typeof unityFramework||!unityFramework){var e,t=[["br","br"],["gz","gzip"]];for(e in t){var r,n=t[e];if(c.frameworkUrl.endsWith("."+n[0]))return r="Unable to parse "+c.frameworkUrl+"!","file:"==location.protocol?void i(r+" Loading pre-compressed (brotli or gzip) content via a file:// URL without a web server is not supported by this browser. Please use a local development web server to host compressed Unity content, or use the Unity Build and Run option.","error"):(r+=' This can happen if build compression was enabled but web server hosting the content was misconfigured to not serve the file with HTTP Response Header "Content-Encoding: '+n[1]+'" present. Check browser Console and Devtools Network tab to debug.',"br"==n[0]&&"http:"==location.protocol&&(n=-1!=["localhost","127.0.0.1"].indexOf(location.hostname)?"":"Migrate your server to use HTTPS.",r=/Firefox/.test(navigator.userAgent)?"Unable to parse "+c.frameworkUrl+'!<br>If using custom web server, verify that web server is sending .br files with HTTP Response Header "Content-Encoding: br". Brotli compression may not be supported in Firefox over HTTP connections. '+n+' See <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1670675">https://bugzilla.mozilla.org/show_bug.cgi?id=1670675</a> for more information.':"Unable to parse "+c.frameworkUrl+'!<br>If using custom web server, verify that web server is sending .br files with HTTP Response Header "Content-Encoding: br". Brotli compression may not be supported over HTTP connections. Migrate your server to use HTTPS.'),void i(r,"error"))}i("Unable to parse "+c.frameworkUrl+"! The file is corrupt, or compression was misconfigured? (check Content-Encoding HTTP Response Header on web server)","error")}var o=unityFramework;unityFramework=null,s.onload=null,a(o)},s.onerror=function(e){i("Unable to load file "+c.frameworkUrl+"! Check that the file exists on the remote server. (also check browser Console and Devtools Network tab to debug)","error")},document.body.appendChild(s),c.deinitializers.push(function(){document.body.removeChild(s)})}).then(function(e){e(c)});x(r="dataUrl"),e=c.cacheControl(c[r]),t=c.companyName&&c.productName?c.cachedFetch:c.fetchWithProgress,n=c[r],n=/file:\/\//.exec(n)?"same-origin":void 0;var r,e,t,n,o=t(c[r],{method:"GET",companyName:c.companyName,productName:c.productName,control:e,mode:n,onProgress:function(e){x(r,e)}}).then(function(e){return e.parsedBody}).catch(function(e){var t="Failed to download file "+c[r];"file:"==location.protocol?i(t+". Loading web pages via a file:// URL without a web server is not supported by this browser. Please use a local development web server to host Unity content, or use the Unity Build and Run option.","error"):console.error(t)});c.preRun.push(function(){c.addRunDependency("dataUrl"),o.then(function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),r=0,n="UnityWebData1.0\0";if(!String.fromCharCode.apply(null,e.subarray(r,r+n.length))==n)throw"unknown data format";var o=t.getUint32(r+=n.length,!0);for(r+=4;r<o;){var a=t.getUint32(r,!0),s=(r+=4,t.getUint32(r,!0)),i=(r+=4,t.getUint32(r,!0)),d=(r+=4,String.fromCharCode.apply(null,e.subarray(r,r+i)));r+=i;for(var u=0,l=d.indexOf("/",u)+1;0<l;u=l,l=d.indexOf("/",u)+1)c.FS_createPath(d.substring(0,u),d.substring(u,l-1),!0,!0);c.FS_createDataFile(d,null,e.subarray(a,a+s),!0,!0,!0)}c.removeRunDependency("dataUrl")})})}return c.SystemInfo=function(){var e,t,r,n,o=navigator.userAgent+" ",a=[["Firefox","Firefox"],["OPR","Opera"],["Edg","Edge"],["SamsungBrowser","Samsung Browser"],["Trident","Internet Explorer"],["MSIE","Internet Explorer"],["Chrome","Chrome"],["CriOS","Chrome on iOS Safari"],["FxiOS","Firefox on iOS Safari"],["Safari","Safari"]];function s(e,t,r){return(e=RegExp(e,"i").exec(t))&&e[r]}for(var i=0;i<a.length;++i)if(t=s(a[i][0]+"[/ ](.*?)[ \\)]",o,1)){e=a[i][1];break}"Safari"==e&&(t=s("Version/(.*?) ",o,1)),"Internet Explorer"==e&&(t=s("rv:(.*?)\\)? ",o,1)||t);for(var d=[["Windows (.*?)[;)]","Windows"],["Android ([0-9_.]+)","Android"],["iPhone OS ([0-9_.]+)","iPhoneOS"],["iPad.*? OS ([0-9_.]+)","iPadOS"],["FreeBSD( )","FreeBSD"],["OpenBSD( )","OpenBSD"],["Linux|X11()","Linux"],["Mac OS X ([0-9_\\.]+)","MacOS"],["bot|google|baidu|bing|msn|teoma|slurp|yandex","Search Bot"]],u=0;u<d.length;++u)if(c=s(d[u][0],o,1)){r=d[u][1],c=c.replace(/_/g,".");break}var l,c={"NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"Server 2003","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 10.0":"10"}[c]||c,h=((h=document.createElement("canvas"))&&(l=(f=h.getContext("webgl2"))?2:0,f||(f=h&&h.getContext("webgl"))&&(l=1),f&&(n=f.getExtension("WEBGL_debug_renderer_info")&&f.getParameter(37446)||f.getParameter(7937))),"undefined"!=typeof SharedArrayBuffer),f="object"==typeof WebAssembly&&"function"==typeof WebAssembly.compile;return{width:screen.width,height:screen.height,userAgent:o.trim(),browser:e||"Unknown browser",browserVersion:t||"Unknown version",mobile:/Mobile|Android|iP(ad|hone)/.test(navigator.appVersion),os:r||"Unknown OS",osVersion:c||"Unknown OS Version",gpu:n||"Unknown GPU",language:navigator.userLanguage||navigator.language,hasWebGL:l,hasCursorLock:!!document.body.requestPointerLock,hasFullscreen:!!document.body.requestFullscreen||!!document.body.webkitRequestFullscreen,hasThreads:h,hasWasm:f,hasWasmThreads:!1}}(),c.abortHandler=function(e){return C(e,"",0),!0},Error.stackTraceLimit=Math.max(Error.stackTraceLimit||0,50),c.readBodyWithProgress=function(a,s,i){var e=a.body?a.body.getReader():void 0,d=void 0!==a.headers.get("Content-Length"),u=function(e,t){if(!t)return 0;var t=e.headers.get("Content-Encoding"),r=parseInt(e.headers.get("Content-Length"));switch(t){case"br":return Math.round(5*r);case"gzip":return Math.round(4*r);default:return r}}(a,d),l=new Uint8Array(u),c=[],h=0,f=0;return d||console.warn("[UnityCache] Response is served without Content-Length header. Please reconfigure server to include valid Content-Length for better download performance."),function o(){return void 0===e?a.arrayBuffer().then(function(e){var t=new Uint8Array(e);return s({type:"progress",response:a,total:e.length,loaded:0,lengthComputable:d,chunk:i?t:null}),t}):e.read().then(function(e){if(e.done){if(h===u)return l;if(h<u)return l.slice(0,h);for(var t=new Uint8Array(h),r=(t.set(l,0),f),n=0;n<c.length;++n)t.set(c[n],r),r+=c[n].length;return t}return h+e.value.length<=l.length?(l.set(e.value,h),f=h+e.value.length):c.push(e.value),h+=e.value.length,s({type:"progress",response:a,total:Math.max(u,h),loaded:h,lengthComputable:d,chunk:i?e.value:null}),o()})}().then(function(e){return s({type:"load",response:a,total:e.length,loaded:e.length,lengthComputable:d,chunk:null}),a.parsedBody=e,a})},c.fetchWithProgress=function(e,t){var r=function(){};return t&&t.onProgress&&(r=t.onProgress),fetch(e,t).then(function(e){return c.readBodyWithProgress(e,r,t.enableStreamingDownload)})},c.UnityCache=(u={name:"UnityCache",version:3},l={name:"RequestStore",version:1},h={name:"WebAssembly",version:1},f=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,S.UnityCacheDatabase=u,S.RequestStore=l,S.WebAssemblyStore=h,p=null,S.getInstance=function(){return p=p||new S},S.destroyInstance=function(){return p?p.close().then(function(){p=null}):Promise.resolve()},S.clearCache=function(){return S.destroyInstance().then(function(){return new Promise(function(e,t){var r=f.deleteDatabase(u.name);r.onsuccess=function(){e()},r.onerror=function(){t(new Error("Could not delete database."))},r.onblocked=function(){t(new Error("Database blocked."))}})})},S.prototype.execute=function(a,s,i){return this.isConnected.then(function(){return new Promise(function(t,r){try{var e,n,o;null===this.database?r(new Error("indexedDB access denied")):(e=-1!=["put","delete","clear"].indexOf(s)?"readwrite":"readonly",n=this.database.transaction([a],e).objectStore(a),"openKeyCursor"==s&&(n=n.index(i[0]),i=i.slice(1)),(o=n[s].apply(n,i)).onsuccess=function(e){t(e.target.result)},o.onerror=function(e){r(e)})}catch(e){r(e)}}.bind(this))}.bind(this))},S.prototype.loadRequest=function(e){return this.execute(l.name,"get",[e])},S.prototype.storeRequest=function(e){return this.execute(l.name,"put",[e])},S.prototype.close=function(){return this.isConnected.then(function(){this.database&&(this.database.close(),this.database=null)}.bind(this))},S),c.cachedFetch=(g=c.UnityCache,m=g.RequestStore,b=c.fetchWithProgress,k.prototype.arrayBuffer=function(){return Promise.resolve(this.parsedBody.buffer)},k.prototype.blob=function(){return this.arrayBuffer().then(function(e){return new Blob([e])})},k.prototype.json=function(){return this.text().then(function(e){return JSON.parse(e)})},k.prototype.text=function(){var e=new TextDecoder;return Promise.resolve(e.decode(this.parsedBody))},function(n,o){var e,t,a=g.getInstance(),r=E("string"==typeof n?n:n.url),s={enabled:(e=r,(!(t=o)||!t.method||"GET"===t.method)&&((!t||-1!=["must-revalidate","immutable"].indexOf(t.control))&&!!e.match("^https?://")))};function i(e,t){return b(e,t).then(function(e){if(s.enabled&&!s.revalidated){if(304===e.status)return s.result.revalidated=s.result.accessed,s.revalidated=!0,a.storeRequest(s.result).then(function(){T("'"+s.result.url+"' successfully revalidated and served from the indexedDB cache")}).catch(function(e){T("'"+s.result.url+"' successfully revalidated but not stored in the indexedDB cache due to the error: "+e)}),new k(s.result.response);200==e.status?(s.result=P(e.url,s.company,s.product,s.accessed,e),s.revalidated=!0,a.storeRequest(s.result).then(function(){T("'"+s.result.url+"' successfully downloaded and stored in the indexedDB cache")}).catch(function(e){T("'"+s.result.url+"' successfully downloaded but not stored in the indexedDB cache due to the error: "+e)})):T("'"+s.result.url+"' request failed with status: "+e.status+" "+e.statusText)}return e})}function d(e){o&&o.onProgress&&(o.onProgress({type:"progress",total:e.parsedBody.length,loaded:e.parsedBody.length,lengthComputable:!0}),o.onProgress({type:"load",total:e.parsedBody.length,loaded:e.parsedBody.length,lengthComputable:!0}))}return o&&(s.control=o.control,s.company=o.company,s.product=o.product),s.result=P(r,s.company,s.product,Date.now()),s.revalidated=!1,s.enabled?a.loadRequest(s.result.url).then(function(e){if(!e||e.version!==m.version)return i(n,o);s.result=e,s.result.accessed=Date.now();var t,r=new k(s.result.response);return"immutable"==s.control?(s.revalidated=!0,a.storeRequest(s.result),T("'"+s.result.url+"' served from the indexedDB cache without revalidation"),d(r),r):(e=s.result.url,(t=window.location.href.match(/^[a-z]+:\/\/[^\/]+/))&&!e.lastIndexOf(t[0],0)||!r.headers.get("Last-Modified")&&!r.headers.get("ETag")?(e=(o=o||{}).headers||{},o.headers=e,r.headers.get("Last-Modified")?(e["If-Modified-Since"]=r.headers.get("Last-Modified"),e["Cache-Control"]="no-cache"):r.headers.get("ETag")&&(e["If-None-Match"]=r.headers.get("ETag"),e["Cache-Control"]="no-cache"),i(n,o)):fetch(s.result.url,{method:"HEAD"}).then(function(t){return s.revalidated=["Last-Modified","ETag"].every(function(e){return!r.headers.get(e)||r.headers.get(e)==t.headers.get(e)}),s.revalidated?(s.result.revalidated=s.result.accessed,a.storeRequest(s.result),T("'"+s.result.url+"' successfully revalidated and served from the indexedDB cache"),d(r),r):i(n,o)}))}).catch(function(e){return T("Failed to load '"+s.result.url+"' from indexedDB cache due to the error: "+e),b(n,o)}):b(n,o)}),new Promise(function(e,t){c.SystemInfo.hasWebGL?c.SystemInfo.hasWasm?(1==c.SystemInfo.hasWebGL&&c.print('Warning: Your browser does not support "WebGL 2" Graphics API, switching to "WebGL 1"'),c.startupErrorHandler=t,d(0),c.postRun.push(function(){d(1),delete c.startupErrorHandler,e(w)}),U()):t("Your browser does not support WebAssembly."):t("Your browser does not support WebGL.")})}
Build/WebFeatherless.wasm ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b664bfff7f2f3824a36758a911478818acd8e865749c117d831a9d8edbb64045
3
+ size 14077777
TemplateData/favicon.ico ADDED
TemplateData/fullscreen-button.png ADDED
TemplateData/progress-bar-empty-dark.png ADDED
TemplateData/progress-bar-empty-light.png ADDED
TemplateData/progress-bar-full-dark.png ADDED
TemplateData/progress-bar-full-light.png ADDED
TemplateData/style.css ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body { padding: 0; margin: 0 }
2
+ #unity-container { position: absolute }
3
+ #unity-container.unity-desktop { left: 50%; top: 50%; transform: translate(-50%, -50%) }
4
+ #unity-container.unity-mobile { width: 100%; height: 100% }
5
+ #unity-canvas { background: #231F20 }
6
+ .unity-mobile #unity-canvas { width: 100%; height: 100% }
7
+ #unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
8
+ #unity-logo { width: 154px; height: 130px; background: url('unity-logo-dark.png') no-repeat center }
9
+ #unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; margin-left: 6.5px; background: url('progress-bar-empty-dark.png') no-repeat center }
10
+ #unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-dark.png') no-repeat center }
11
+ #unity-footer { position: relative }
12
+ .unity-mobile #unity-footer { display: none }
13
+ #unity-webgl-logo { float:left; width: 204px; height: 38px; background: url('webgl-logo.png') no-repeat center }
14
+ #unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px }
15
+ #unity-fullscreen-button { float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center }
16
+ #unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }
TemplateData/unity-logo-dark.png ADDED
TemplateData/unity-logo-light.png ADDED
TemplateData/webgl-logo.png ADDED
index.html CHANGED
@@ -1,19 +1,119 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
+ <!DOCTYPE html>
2
+ <html lang="en-us">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6
+ <title>Unity WebGL Player | RWKV-Game</title>
7
+ <link rel="shortcut icon" href="TemplateData/favicon.ico">
8
+ <link rel="stylesheet" href="TemplateData/style.css">
9
+ </head>
10
+ <body>
11
+ <div id="unity-container" class="unity-desktop">
12
+ <canvas id="unity-canvas" width=960 height=600></canvas>
13
+ <div id="unity-loading-bar">
14
+ <div id="unity-logo"></div>
15
+ <div id="unity-progress-bar-empty">
16
+ <div id="unity-progress-bar-full"></div>
17
+ </div>
18
+ </div>
19
+ <div id="unity-warning"> </div>
20
+ <div id="unity-footer">
21
+ <div id="unity-webgl-logo"></div>
22
+ <div id="unity-fullscreen-button"></div>
23
+ <div id="unity-build-title">RWKV-Game</div>
24
+ </div>
25
+ </div>
26
+ <script>
27
+ var container = document.querySelector("#unity-container");
28
+ var canvas = document.querySelector("#unity-canvas");
29
+ var loadingBar = document.querySelector("#unity-loading-bar");
30
+ var progressBarFull = document.querySelector("#unity-progress-bar-full");
31
+ var fullscreenButton = document.querySelector("#unity-fullscreen-button");
32
+ var warningBanner = document.querySelector("#unity-warning");
33
+
34
+ // Shows a temporary message banner/ribbon for a few seconds, or
35
+ // a permanent error message on top of the canvas if type=='error'.
36
+ // If type=='warning', a yellow highlight color is used.
37
+ // Modify or remove this function to customize the visually presented
38
+ // way that non-critical warnings and error messages are presented to the
39
+ // user.
40
+ function unityShowBanner(msg, type) {
41
+ function updateBannerVisibility() {
42
+ warningBanner.style.display = warningBanner.children.length ? 'block' : 'none';
43
+ }
44
+ var div = document.createElement('div');
45
+ div.innerHTML = msg;
46
+ warningBanner.appendChild(div);
47
+ if (type == 'error') div.style = 'background: red; padding: 10px;';
48
+ else {
49
+ if (type == 'warning') div.style = 'background: yellow; padding: 10px;';
50
+ setTimeout(function() {
51
+ warningBanner.removeChild(div);
52
+ updateBannerVisibility();
53
+ }, 5000);
54
+ }
55
+ updateBannerVisibility();
56
+ }
57
+
58
+ var buildUrl = "Build";
59
+ var loaderUrl = buildUrl + "/WebFeatherless.loader.js";
60
+ var config = {
61
+ dataUrl: buildUrl + "/WebFeatherless.data",
62
+ frameworkUrl: buildUrl + "/WebFeatherless.framework.js",
63
+ codeUrl: buildUrl + "/WebFeatherless.wasm",
64
+ streamingAssetsUrl: "StreamingAssets",
65
+ companyName: "DefaultCompany",
66
+ productName: "RWKV-Game",
67
+ productVersion: "1.0",
68
+ showBanner: unityShowBanner,
69
+ };
70
+
71
+ // By default, Unity keeps WebGL canvas render target size matched with
72
+ // the DOM size of the canvas element (scaled by window.devicePixelRatio)
73
+ // Set this to false if you want to decouple this synchronization from
74
+ // happening inside the engine, and you would instead like to size up
75
+ // the canvas DOM size and WebGL render target sizes yourself.
76
+ // config.matchWebGLToCanvasSize = false;
77
+
78
+ if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
79
+ // Mobile device style: fill the whole browser client area with the game canvas:
80
+
81
+ var meta = document.createElement('meta');
82
+ meta.name = 'viewport';
83
+ meta.content = 'width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, shrink-to-fit=yes';
84
+ document.getElementsByTagName('head')[0].appendChild(meta);
85
+ container.className = "unity-mobile";
86
+ canvas.className = "unity-mobile";
87
+
88
+ // To lower canvas resolution on mobile devices to gain some
89
+ // performance, uncomment the following line:
90
+ // config.devicePixelRatio = 1;
91
+
92
+ unityShowBanner('WebGL builds are not supported on mobile devices.');
93
+ } else {
94
+ // Desktop style: Render the game canvas in a window that can be maximized to fullscreen:
95
+
96
+ canvas.style.width = "960px";
97
+ canvas.style.height = "600px";
98
+ }
99
+
100
+ loadingBar.style.display = "block";
101
+
102
+ var script = document.createElement("script");
103
+ script.src = loaderUrl;
104
+ script.onload = () => {
105
+ createUnityInstance(canvas, config, (progress) => {
106
+ progressBarFull.style.width = 100 * progress + "%";
107
+ }).then((unityInstance) => {
108
+ loadingBar.style.display = "none";
109
+ fullscreenButton.onclick = () => {
110
+ unityInstance.SetFullscreen(1);
111
+ };
112
+ }).catch((message) => {
113
+ alert(message);
114
+ });
115
+ };
116
+ document.body.appendChild(script);
117
+ </script>
118
+ </body>
119
  </html>