added a test
This commit is contained in:
1 parent
b2c965bbed
commit
fb377e3fb8
17 files changed
+109
-5
No files matched your search
BIN
Binary file not shown.
@@ -0,0 +1 @@
|
||||
var UnityLoader=UnityLoader||{compatibilityCheck:function(e,t,r){UnityLoader.SystemInfo.hasWebGL?UnityLoader.SystemInfo.mobile?e.popup("Please note that Unity WebGL is not currently supported on mobiles. Press OK if you wish to continue anyway.",[{text:"OK",callback:t}]):["Firefox","Chrome","Safari"].indexOf(UnityLoader.SystemInfo.browser)==-1?e.popup("Please note that your browser is not currently supported for this Unity WebGL content. Press OK if you wish to continue anyway.",[{text:"OK",callback:t}]):t():e.popup("Your browser does not support WebGL",[{text:"OK",callback:r}])},Blobs:{},loadCode:function(e,t,r){var n=[].slice.call(UnityLoader.Cryptography.md5(e)).map(function(e){return("0"+e.toString(16)).substr(-2)}).join(""),o=document.createElement("script"),i=URL.createObjectURL(new Blob(['UnityLoader["'+n+'"]=',e],{type:"text/javascript"}));UnityLoader.Blobs[i]=r,o.src=i,o.onload=function(){URL.revokeObjectURL(i),t(n)},document.body.appendChild(o)},allocateHeapJob:function(e,t){for(var r=e.TOTAL_STACK||5242880,n=e.TOTAL_MEMORY||(e.buffer?e.buffer.byteLength:268435456),o=65536,i=16777216,a=o;a<n||a<2*r;)a+=a<i?a:i;a!=n&&e.printErr("increasing TOTAL_MEMORY to "+a+" to be compliant with the asm.js spec (and given that TOTAL_STACK="+r+")"),n=a,t.parameters.useWasm?(e.wasmMemory=new WebAssembly.Memory({initial:n/o,maximum:n/o}),e.buffer=e.wasmMemory.buffer):e.buffer?e.buffer.byteLength!=n&&(e.printErr("provided buffer should be "+n+" bytes, but it is "+e.buffer.byteLength+", reallocating the buffer"),e.buffer=new ArrayBuffer(n)):e.buffer=new ArrayBuffer(n),e.TOTAL_MEMORY=e.buffer.byteLength,t.complete()},setupIndexedDBJob:function(e,t){function r(n){r.called||(r.called=!0,e.indexedDB=n,t.complete())}try{var n=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,o=n.open("/idbfs-test");o.onerror=function(e){e.preventDefault(),r()},o.onsuccess=function(){o.result.close(),r(n)},setTimeout(r,1e3)}catch(e){r()}},processWasmCodeJob:function(e,t){e.wasmBinary=UnityLoader.Job.result(e,"downloadWasmCode"),t.complete()},processWasmFrameworkJob:function(e,t){UnityLoader.loadCode(UnityLoader.Job.result(e,"downloadWasmFramework"),function(r){UnityLoader[r](e),t.complete()},{Module:e,url:e.wasmFrameworkUrl})},processAsmCodeJob:function(e,t){var r=UnityLoader.Job.result(e,"downloadAsmCode");UnityLoader.loadCode(Math.fround?r:UnityLoader.Utils.optimizeMathFround(r),function(r){e.asm=UnityLoader[r],t.complete()},{Module:e,url:e.asmCodeUrl})},processAsmFrameworkJob:function(e,t){UnityLoader.loadCode(UnityLoader.Job.result(e,"downloadAsmFramework"),function(r){UnityLoader[r](e),t.complete()},{Module:e,url:e.asmFrameworkUrl})},processAsmMemoryJob:function(e,t){e.memoryInitializerRequest.status=200,e.memoryInitializerRequest.response=UnityLoader.Job.result(e,"downloadAsmMemory"),e.memoryInitializerRequest.callback&&e.memoryInitializerRequest.callback(),t.complete()},processDataJob:function(e,t){var r=UnityLoader.Job.result(e,"downloadData"),n=new DataView(r.buffer,r.byteOffset,r.byteLength),o=0,i="UnityWebData1.0\0";if(!String.fromCharCode.apply(null,r.subarray(o,o+i.length))==i)throw"unknown data format";o+=i.length;var a=n.getUint32(o,!0);for(o+=4;o<a;){var s=n.getUint32(o,!0);o+=4;var d=n.getUint32(o,!0);o+=4;var l=n.getUint32(o,!0);o+=4;var f=String.fromCharCode.apply(null,r.subarray(o,o+l));o+=l;for(var u=0,c=f.indexOf("/",u)+1;c>0;u=c,c=f.indexOf("/",u)+1)e.FS_createPath(f.substring(0,u),f.substring(u,c-1),!0,!0);e.FS_createDataFile(f,null,r.subarray(s,s+d),!0,!0,!0)}e.removeRunDependency("processDataJob"),t.complete()},downloadJob:function(e,t){var r=new XMLHttpRequest;r.open("GET",t.parameters.url),r.responseType="arraybuffer",r.onload=function(){UnityLoader.Compression.decompress(new Uint8Array(r.response),function(e){t.complete(e)})},t.parameters.onprogress&&r.addEventListener("progress",t.parameters.onprogress),t.parameters.onload&&r.addEventListener("load",t.parameters.onload),r.send()},scheduleBuildDownloadJob:function(e,t,r){UnityLoader.Progress.update(e,t),UnityLoader.Job.schedule(e,t,[],UnityLoader.downloadJob,{url:e.resolveBuildUrl(r),onprogress:function(r){UnityLoader.Progress.update(e,t,r)},onload:function(r){UnityLoader.Progress.update(e,t,r)}})},loadModule:function(e){if(e.useWasm=e.wasmCodeUrl&&UnityLoader.SystemInfo.hasWasm,e.useWasm)UnityLoader.scheduleBuildDownloadJob(e,"downloadWasmCode",e.wasmCodeUrl),UnityLoader.Job.schedule(e,"processWasmCode",["downloadWasmCode"],UnityLoader.processWasmCodeJob),UnityLoader.scheduleBuildDownloadJob(e,"downloadWasmFramework",e.wasmFrameworkUrl),UnityLoader.Job.schedule(e,"processWasmFramework",["downloadWasmFramework","processWasmCode","setupIndexedDB"],UnityLoader.processWasmFrameworkJob);else{if(!e.asmCodeUrl)throw"WebAssembly support is not detected in this browser.";UnityLoader.scheduleBuildDownloadJob(e,"downloadAsmCode",e.asmCodeUrl),UnityLoader.Job.schedule(e,"processAsmCode",["downloadAsmCode"],UnityLoader.processAsmCodeJob),UnLine truncated
|
||||
BIN
Binary file not shown.
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"TOTAL_MEMORY": 268435456,
|
||||
"dataUrl": "death_run_wasm_v1.data.unityweb",
|
||||
"wasmCodeUrl": "death_run_wasm_v1.wasm.code.unityweb",
|
||||
"wasmFrameworkUrl": "death_run_wasm_v1.wasm.framework.unityweb",
|
||||
"asmCodeUrl": "death_run_wasm_v1.asm.code.unityweb",
|
||||
"asmMemoryUrl": "death_run_wasm_v1.asm.memory.unityweb",
|
||||
"asmFrameworkUrl": "death_run_wasm_v1.asm.framework.unityweb",
|
||||
"splashScreenStyle": "Dark",
|
||||
"backgroundColor": "#231F20"
|
||||
}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 978 B |
+10
@@ -0,0 +1,10 @@
|
||||
const rootPath='TemplateData56';function UnityProgress(gameInstance,progress){if(!gameInstance.Module){return;}
|
||||
if(!gameInstance.logo){gameInstance.logo=document.createElement("div");gameInstance.logo.className="logo "+gameInstance.Module.splashScreenStyle;gameInstance.container.appendChild(gameInstance.logo);}
|
||||
if(!gameInstance.progress){gameInstance.progress=document.createElement("div");gameInstance.progress.className="progress "+gameInstance.Module.splashScreenStyle;gameInstance.progress.empty=document.createElement("div");gameInstance.progress.empty.className="empty";gameInstance.progress.appendChild(gameInstance.progress.empty);gameInstance.progress.full=document.createElement("div");gameInstance.progress.full.className="full";gameInstance.progress.appendChild(gameInstance.progress.full);gameInstance.container.appendChild(gameInstance.progress);gameInstance.textProgress=document.createElement("div");gameInstance.textProgress.className="text";gameInstance.container.appendChild(gameInstance.textProgress);}
|
||||
gameInstance.progress.full.style.width=(100*progress)+"%";gameInstance.progress.empty.style.width=(100*(1-progress))+"%";gameInstance.textProgress.innerHTML='Loading: '+Math.floor(progress*100)+'%';if(progress==1){gameInstance.textProgress.innerHTML='Running... <img src="'+rootPath+'/gears.gif" class="spinner" />';}
|
||||
if(progress=='complete'){gameInstance.logo.style.display='none';gameInstance.progress.style.display='none';gameInstance.textProgress.style.display='none';const event=new Event('removeSoundOverlay');document.dispatchEvent(event);}}
|
||||
window.Game=(function(){var Game=function(){this.registerEvents();};Game.prototype.registerEvents=function(){var _this=this;window.addEventListener("keydown",function(e){if([8,37,38,39,40].indexOf(e.keyCode)>-1){e.preventDefault();}},false);document.onmousedown=function(){window.focus();};document.addEventListener('DOMContentLoaded',function(){_this.resize();},false);window.addEventListener('resize',function(){setTimeout(function(){_this.resize();},1000);},false);};Game.prototype.getQueryVariable=function(variable){var query=window.location.search.substring(1);var vars=query.split("&");for(var i=0;i<vars.length;i++){var pair=vars[i].split("=");if(pair[0]==variable){return pair[1];}}
|
||||
return(false);}
|
||||
Game.prototype.resize=function(){var ratioTolerant=this.getQueryVariable('ratio_tolerant');if(ratioTolerant==false||this.fullscreen()){return;}
|
||||
document.getElementsByTagName('body')[0].style.overflow='hidden';var gameContainer=document.getElementById('gameContainer')||document.getElementById('unityContainer');var canvas=document.getElementById('#canvas');var gameSizeRatio=gameContainer.offsetWidth/gameContainer.offsetHeight;var maxHeight=this.maxHeight();var maxWidth=window.innerWidth;var windowSizeRatio=maxWidth/maxHeight;var newStyle={width:gameContainer.offsetWidth,height:gameContainer.offsetHeight};if(ratioTolerant=='true'){newStyle={width:maxWidth,height:maxHeight};}else if(ratioTolerant=='false'){if(gameSizeRatio>windowSizeRatio){newStyle={width:maxWidth,height:maxWidth/gameSizeRatio};}else{newStyle={width:maxHeight*gameSizeRatio,height:maxHeight};}}
|
||||
this.updateStyle(gameContainer,newStyle);if(canvas){this.updateStyle(canvas,newStyle);}};Game.prototype.maxHeight=function(){return window.innerHeight-43;};Game.prototype.updateStyle=function(element,size){element.setAttribute('width',size.width);element.setAttribute('height',size.height);element.style.width=size.width+'px';element.style.height=size.height+'px';};Game.prototype.fullscreen=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;};return Game;})();new Game();
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 8.0 KiB |
+1
@@ -0,0 +1 @@
|
||||
.webgl-content *{border:0;margin:0;padding:0}.webgl-content{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.webgl-content .logo,.progress,.text{position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.webgl-content .logo{background:url('logo.png') no-repeat center/contain;width:154px;height:130px}.webgl-content .progress{height:18px;width:141px;margin-top:80px}.webgl-content .progress .empty{background:url('progressEmpty.Light.png') no-repeat right/cover;float:right;width:100%;height:100%;display:inline-block}.webgl-content .progress .full{background:url('progressFull.Light.png') no-repeat left/cover;float:left;width:0%;height:100%;display:inline-block}.webgl-content .text{margin-top:110px;color:#fff;font-weight:700}.webgl-content .spinner{vertical-align:middle}.webgl-content .logo.Dark{background-image:url(../TemplateData/y8-logo.png);width:206px;height:130px;margin:0 auto;background-size:206px 130px}.webgl-content .progress.Dark .empty{background:#000}.webgl-content .progress.Dark .full{background:red}.webgl-content .footer{margin-top:5px;height:38px;line-height:38px;font-family:Helvetica,Verdana,Arial,sans-serif;font-size:18px;background:#fff}.webgl-content .footer .webgl-logo,.title,.fullscreen{height:100%;display:inline-block;background:transparent center no-repeat}.webgl-content .footer .webgl-logo{background-image:url(webgl-logo.png);width:204px;float:left}.webgl-content .footer .title{margin-right:10px;float:right}.webgl-content .footer .fullscreen{background-image:url(fullscreen.png);width:38px;float:right}.webgl-content #gameContainer{background:#4d4d4d!important}.webgl-content .footer{background:#222;font-family:Helvetica,Verdana,Arial,sans-serif;height:40px;line-height:40px;margin:0}.webgl-content .footer .webgl-logo,.title,.fullscreen{background:transparent center no-repeat;display:inline-block;height:100%}.webgl-content .footer .unity,.webgl-content .footer .webgl{box-sizing:border-box;background-position:10px center;background-repeat:no-repeat;background-size:46px 18px;height:40px;float:left;padding:0 10px;width:66px}.webgl-content .footer .unity.enable{background-image:url(unity-enable.png)}.webgl-content .footer .unity.disable{background-image:url(unity-disable.png)}.webgl-content .footer .webgl.enable{background-image:url(webgl-enable.png)}.webgl-content .footer .webgl.disable{background-image:url(webgl-disable.png)}.webgl-content .footer .fullscreen{background-image:url(maximize-icon.png);background-position:10px center;background-repeat:no-repeat;background-size:16px;box-sizing:border-box;color:#fff;float:right;font-size:12px;padding:0 10px 0 36px;width:auto}.webgl-content .footer .unity.disable:hover,.webgl-content .footer .webgl.disable:hover,.webgl-content .footer .fullscreen:hover{background-color:#3e3e3e;cursor:pointer}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
@@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<script>
|
||||
if (window.parent !== window.self) window.parent.postMessage("bonk", "*");
|
||||
window.addEventListener("DOMContentLoaded", function () {
|
||||
document.body.style.margin = "0";
|
||||
document.body.style.height = "100vh";
|
||||
document.body.style.overflow = "hidden";
|
||||
});
|
||||
</script>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Death Run 3D | BBC Unblocked Games</title>
|
||||
<link href="shared/style.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="TemplateData56/style.css" />
|
||||
<script src="TemplateData56/UnityProgress.js"></script>
|
||||
<link rel="shortcut icon" href="TemplateData/favicon.ico" />
|
||||
<script src="Build/UnityLoader.js"></script>
|
||||
<script src="/js/main.js"></script>
|
||||
<script>
|
||||
window.rWS = WebSocket;
|
||||
WebSocket = function (url, options) {
|
||||
var split = url.split("://");
|
||||
var prefix = "";
|
||||
switch (split[0].toLowerCase()) {
|
||||
case "ws":
|
||||
prefix = "wss://onebigorange-tmm.tbt.mx/websocket/http://";
|
||||
break;
|
||||
case "wss":
|
||||
prefix = "wss://onebigorange-tmm.tbt.mx/websocket/https://";
|
||||
break;
|
||||
default:
|
||||
prefix = split[0];
|
||||
}
|
||||
return new (Function.prototype.bind.call(
|
||||
window.rWS,
|
||||
null,
|
||||
(split[1].match(/\//g) || []).length === 0 ? (split[1].includes("?") ? prefix + split[1].replace("?", "/?") : prefix + split[1] + "/") : prefix + split[1],
|
||||
options
|
||||
))();
|
||||
};
|
||||
var origOpen = XMLHttpRequest.prototype.open;
|
||||
XMLHttpRequest.prototype.open = function (...args) {
|
||||
args[1] = /^http/.test(args[1]) ? "https://onebigstatic-tmm.tbt.mx/static/" + args[1] : args[1];
|
||||
origOpen.apply(this, args);
|
||||
};
|
||||
var gameInstance = UnityLoader.instantiate("gameContainer", "Build/death_run_wasm_v1.json", {
|
||||
onProgress: UnityProgress,
|
||||
Module: {
|
||||
onRuntimeInitialized: function () {
|
||||
UnityProgress(gameInstance, "complete");
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<script src="shared/lib.js" type="text/javascript"></script>
|
||||
<script src="shared/gamebreak/gamebreak.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="webgl-content">
|
||||
<div id="gameContainer" style="width: 100vw; height: 100vh;"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
function InitExternEval(){}
|
||||
@@ -0,0 +1,13 @@
|
||||
window.BrowserDetector=(function(){function detect(){var ua=navigator.userAgent;var tem;var M=ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+\.\d+)/i)||[];if(/trident/i.test(M[1])){tem=/\brv[ :]+(\d+\.\d+)/g.exec(ua)||[];return{name:'Internet Explorer',version:(tem[1]||'')};}
|
||||
if(/(coc_coc_browser|edge(?=\/))\/?\s*(\d+\.\d+)/i.test(ua)){tem=ua.match(/(coc_coc_browser|edge(?=\/))\/?\s*(\d+)\.\d+/i);if(tem!=null){return{name:(tem[1]=='Edge'?tem[1]:'CocCoc'),version:tem[2]};}}
|
||||
if(M[1]==='Chrome'){tem=ua.match(/\bOPR\/(\d+\.\d+)/);if(tem!=null){return{name:'Opera',version:tem[1]};}}
|
||||
M=M[2]?[M[1],M[2]]:[navigator.appName,navigator.appVersion,'-?'];if((tem=ua.match(/version\/(\d+\.\d+)/i))!=null){M.splice(1,1,tem[1]);}
|
||||
if(M[0]=='MSIE'){M[0]='Internet Explorer';}
|
||||
return{name:M[0],version:M[1]};}
|
||||
var detect=detect();return{name:detect.name,version:detect.version,msie:(detect.name=='Internet Explorer'),msedge:(detect.name=='Edge'),coccoc:(detect.name=='CocCoc'),firefox:(detect.name=='Firefox'),safari:(detect.name=='Safari'),chrome:(detect.name=='Chrome'),opera:(detect.name=='Opera'),};})();function enableSound(){return;}
|
||||
!function(){if(window.UnityLoader){if(window.UnityLoader.compatibilityCheck){window.UnityLoader.compatibilityCheck=function(element,callback,errCallback){callback();}}}
|
||||
if(!(BrowserDetector.chrome&&BrowserDetector.version>=66)){return;}
|
||||
function buildSoundOverlay(){const overlay=document.createElement('div');overlay.classList.add('sound-overlay');overlay.setAttribute('id','sound-overlay');return overlay;}
|
||||
function buildSoundText(){const textNode=document.createTextNode('Click here to enable sound');const textSpan=document.createElement('span');textSpan.classList.add('sound-text');textSpan.appendChild(textNode);return textSpan;}
|
||||
const soundOverlay=buildSoundOverlay();soundOverlay.appendChild(buildSoundText());document.addEventListener('DOMContentLoaded',function(){var root=document.getElementsByClassName('webgl-content')[0];if(!root){root=document.getElementsByClassName('template-wrap')[0];}
|
||||
root.appendChild(soundOverlay);});'click removeSoundOverlay'.split(' ').forEach(e=>document.addEventListener(e,function(){soundOverlay.style.display='none';},false));}();
|
||||
@@ -0,0 +1 @@
|
||||
.sound-overlay{z-index:99999;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;opacity:.9;background:#000}.sound-text{position:relative;top:50%;transform:translateY(-50%);color:#fff;font-size:20px;text-shadow:1px 0 0 #000,0 -1px 0 #000,0 1px 0 #000,-1px 0 0 #000}.redirect-overlay{z-index:99999;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;background:#000}.redirect-text{position:relative;top:50%;transform:translateY(-50%);color:#fff;font-size:20px;text-shadow:1px 0 0 #000,0 -1px 0 #000,0 1px 0 #000,-1px 0 0 #000}.redirect-text a{color:red}.link-to-y8-url{height:40px;float:left;padding:0 10px;color:#fff;font-size:18px}.link-to-y8-url a{color:red}.game-name{padding:0 10px;margin:0;color:#fff;font-size:18px;display:inline-block;font-weight:400}
|
||||
@@ -184,15 +184,14 @@ const mainContentData = [
|
||||
image: "assets/512x512bb.jpg",
|
||||
link: "games/drift-hunters-main/index.html",
|
||||
},
|
||||
{
|
||||
name: "drift-hunters",
|
||||
image: "assets/512x512bb.jpg",
|
||||
link: "games/SceneGd-780a63fac5c58a2fb23f22ff58e7add03353329d/SceneGd-780a63fac5c58a2fb23f22ff58e7add03353329d/WebGLTemplates/PluginYG/index.html",
|
||||
},
|
||||
{
|
||||
name: "dit life",
|
||||
image: "assets/unnamed_480.webp",
|
||||
link: "games/ditlifytest/index.html",
|
||||
}, {
|
||||
name: "3d game test",
|
||||
image: "assets/unnamed_480.webp",
|
||||
link: "games/3d-gam.zip_unzipped/1-main/index.html",
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in new issue
Block a user