2024-08-07 22:27:21 +02:00
|
|
|
<!doctype html>
|
|
|
|
<html lang="en-us">
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
|
<title>Randomwalk</title>
|
|
|
|
<style>
|
|
|
|
body {
|
|
|
|
margin: 0;
|
2024-08-08 03:58:45 +02:00
|
|
|
background-color: black;
|
2024-08-07 22:27:21 +02:00
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<canvas id="canvas" tabindex=-1></canvas>
|
|
|
|
<script type='text/javascript'>
|
|
|
|
|
|
|
|
var Module = {
|
|
|
|
canvas: (() => {
|
|
|
|
var canvas = document.getElementById('canvas');
|
|
|
|
|
|
|
|
// As a default initial behavior, pop up an alert when webgl context is lost. To make your
|
|
|
|
// application robust, you may want to override this behavior before shipping!
|
|
|
|
// See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2
|
|
|
|
canvas.addEventListener("webglcontextlost", (e) => { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);
|
|
|
|
|
|
|
|
return canvas;
|
|
|
|
})(),
|
|
|
|
setStatus: (text) => { console.log(text); },
|
|
|
|
totalDependencies: 0,
|
|
|
|
monitorRunDependencies: (left) => {
|
|
|
|
this.totalDependencies = Math.max(this.totalDependencies, left);
|
|
|
|
Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies - left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');
|
|
|
|
}
|
|
|
|
};
|
|
|
|
Module.setStatus('Downloading...');
|
|
|
|
window.onerror = () => {
|
|
|
|
Module.setStatus('Exception thrown, see JavaScript console');
|
|
|
|
spinnerElement.style.display = 'none';
|
|
|
|
Module.setStatus = (text) => {
|
|
|
|
if (text) console.error('[post-exception status] ' + text);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
{{{ SCRIPT }}}
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|