-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added an option to build for release.
- Loading branch information
Showing
3 changed files
with
10 additions
and
12,195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,151 +1 @@ | ||
<!doctype html> | ||
<html lang="en-us"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" /> | ||
<link rel="manifest" href="./manifest.json" crossorigin="use-credentials"> | ||
<title>Resonate</title> | ||
<style> | ||
body { | ||
margin: 0; | ||
background-color: black | ||
} | ||
|
||
.emscripten { | ||
position: absolute; | ||
top: 0px; | ||
left: 0px; | ||
margin: 0px; | ||
border: 0; | ||
width: 100%; | ||
height: 100%; | ||
overflow: hidden; | ||
display: block; | ||
image-rendering: optimizeSpeed; | ||
image-rendering: -moz-crisp-edges; | ||
image-rendering: -o-crisp-edges; | ||
image-rendering: -webkit-optimize-contrast; | ||
image-rendering: optimize-contrast; | ||
image-rendering: crisp-edges; | ||
image-rendering: pixelated; | ||
-ms-interpolation-mode: nearest-neighbor; | ||
} | ||
</style> | ||
<script> | ||
const default_console_log = console.log; | ||
const default_console_warn = console.warn; | ||
const default_console_error = console.error; | ||
(()=>{ | ||
fetch("/console", { | ||
method: "POST", | ||
headers: {'Content-Type': 'application/json'}, | ||
body: JSON.stringify({type: 'log', data: ['Log server open']}) | ||
}).then( | ||
/*resolve*/()=>{ | ||
console.log = (...data) => { | ||
fetch("/console", { | ||
method: "POST", | ||
headers: {'Content-Type': 'application/json'}, | ||
body: JSON.stringify({type: 'log', data}) | ||
}).then( | ||
/*resolve*/()=>{}, | ||
/*reject*/()=>{ | ||
// No server, restore functions | ||
console.log = default_console_log; | ||
console.warn = default_console_warn; | ||
console.error = default_console_error; | ||
}); | ||
default_console_log.apply(console, data); | ||
}; | ||
console.warn = (...data) => { | ||
fetch("/console", { | ||
method: "POST", | ||
headers: {'Content-Type': 'application/json'}, | ||
body: JSON.stringify({type: 'warn', data}) | ||
}).then( | ||
/*resolve*/()=>{}, | ||
/*reject*/()=>{ | ||
// No server, restore functions | ||
console.log = default_console_log; | ||
console.warn = default_console_warn; | ||
console.error = default_console_error; | ||
}); | ||
default_console_warn.apply(console, data); | ||
}; | ||
console.error = (...data) => { | ||
fetch("/console", { | ||
method: "POST", | ||
headers: {'Content-Type': 'application/json'}, | ||
body: JSON.stringify({type: 'error', data}) | ||
}).then( | ||
/*resolve*/()=>{}, | ||
/*reject*/()=>{ | ||
// No server, restore functions | ||
console.log = default_console_log; | ||
console.warn = default_console_warn; | ||
console.error = default_console_error; | ||
}); | ||
default_console_error.apply(console, data); | ||
}; | ||
}); | ||
})(); | ||
</script> | ||
</head> | ||
<body> | ||
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" onclick="_jsPrepPlayback()"></canvas> | ||
<script type='text/javascript'> | ||
var Module; | ||
(async () => { | ||
Module = { | ||
preRun: [], | ||
postRun: [], | ||
print: (function () { | ||
return function (text) { | ||
text = Array.prototype.slice.call(arguments).join(' '); | ||
console.log(text); | ||
}; | ||
})(), | ||
printErr: function (text) { | ||
text = Array.prototype.slice.call(arguments).join(' '); | ||
console.error(text); | ||
}, | ||
canvas: (function () { | ||
var canvas = document.getElementById('canvas'); | ||
//canvas.addEventListener("webglcontextlost", function(e) { alert('FIXME: WebGL context lost, please reload the page'); e.preventDefault(); }, false); | ||
return canvas; | ||
})(), | ||
setStatus: function (text) { | ||
console.log("status: " + text); | ||
}, | ||
monitorRunDependencies: function (left) { | ||
// no run dependencies to log | ||
} | ||
}; | ||
window.onerror = function (event, source, lineno, colno, error) { | ||
console.error("onerror: " + event.name + ": " + event.message + | ||
"\n\t/bin/public/" + source.split('/').slice(-1) + ":" + lineno + ":" + colno); | ||
console.error(error.stack); | ||
//if(window.matchMedia('(any-pointer: coarse)').matches) // Enable if alert should be for touch only. | ||
alert("OnError: \n" + event.name + ": " + event.message); | ||
}; | ||
|
||
|
||
|
||
// Initialize the graphics adapter | ||
{ | ||
const adapter = await navigator.gpu.requestAdapter(); | ||
const device = await adapter.requestDevice(); | ||
Module.preinitializedWebGPUDevice = device; | ||
} | ||
|
||
if ('serviceWorker' in navigator) { // WPA support | ||
navigator.serviceWorker.register('./ResonateInstallWPA.js', { scope: './' }); | ||
} | ||
})(); | ||
</script> | ||
<script type="text/javascript" src="plugins/timestretch.js"></script> | ||
<script async defer src="https://apis.google.com/js/api.js" onload=""></script> | ||
<script async defer src="https://accounts.google.com/gsi/client" onload=""></script> | ||
<script async type="text/javascript" src="Resonate.js"></script> | ||
</body> | ||
</html> | ||
<!doctypehtml><html lang=en-us><head><meta charset=utf-8><meta content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"name=viewport><link crossorigin=use-credentials href=./manifest.json rel=manifest><title>Resonate</title><style>body{margin:0;background-color:#000}.emscripten{position:absolute;top:0;left:0;margin:0;border:0;width:100%;height:100%;overflow:hidden;display:block;image-rendering:optimizeSpeed;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:-webkit-optimize-contrast;image-rendering:optimize-contrast;image-rendering:crisp-edges;image-rendering:pixelated;-ms-interpolation-mode:nearest-neighbor}</style><script>const default_console_log=console.log,default_console_warn=console.warn,default_console_error=console.error;fetch("/console",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"log",data:["Log server open"]})}).then((()=>{console.log=(...o)=>{fetch("/console",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"log",data:o})}).then((()=>{}),(()=>{console.log=default_console_log,console.warn=default_console_warn,console.error=default_console_error})),default_console_log.apply(console,o)},console.warn=(...o)=>{fetch("/console",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"warn",data:o})}).then((()=>{}),(()=>{console.log=default_console_log,console.warn=default_console_warn,console.error=default_console_error})),default_console_warn.apply(console,o)},console.error=(...o)=>{fetch("/console",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"error",data:o})}).then((()=>{}),(()=>{console.log=default_console_log,console.warn=default_console_warn,console.error=default_console_error})),default_console_error.apply(console,o)}}))</script></head><body><canvas class=emscripten id=canvas onclick=_jsPrepPlayback() oncontextmenu=event.preventDefault()></canvas><script>var Module;(async()=>{Module={preRun:[],postRun:[],print:function(e){e=Array.prototype.slice.call(arguments).join(" "),console.log(e)},printErr:function(e){e=Array.prototype.slice.call(arguments).join(" "),console.error(e)},canvas:document.getElementById("canvas"),setStatus:function(e){console.log("status: "+e)},monitorRunDependencies:function(e){}},window.onerror=function(e,n,o,r,t){console.error("onerror: "+e.name+": "+e.message+"\n\t/bin/public/"+n.split("/").slice(-1)+":"+o+":"+r),console.error(t.stack),alert("OnError: \n"+e.name+": "+e.message)};{const e=await navigator.gpu.requestAdapter(),n=await e.requestDevice();Module.preinitializedWebGPUDevice=n}"serviceWorker"in navigator&&navigator.serviceWorker.register("./ResonateInstallWPA.js",{scope:"./"})})()</script><script src=plugins/timestretch.js></script><script src=https://apis.google.com/js/api.js async defer onload=""></script><script src=https://accounts.google.com/gsi/client async defer onload=""></script><script src=Resonate.js async></script></body></html> |
Oops, something went wrong.