69 lines
1.8 KiB
HTML
69 lines
1.8 KiB
HTML
|
|
<!DOCTYPE html>
|
||
|
|
<html lang="en">
|
||
|
|
<head>
|
||
|
|
<meta charset="utf-8">
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
|
<title>Render Pipeline Visualizer</title>
|
||
|
|
<style>
|
||
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||
|
|
body {
|
||
|
|
background: #1e1e28;
|
||
|
|
display: flex;
|
||
|
|
flex-direction: column;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: center;
|
||
|
|
height: 100vh;
|
||
|
|
overflow: hidden;
|
||
|
|
font-family: 'Courier New', monospace;
|
||
|
|
color: #aaa;
|
||
|
|
}
|
||
|
|
canvas#canvas {
|
||
|
|
width: 100vw;
|
||
|
|
height: 100vh;
|
||
|
|
display: block;
|
||
|
|
object-fit: contain;
|
||
|
|
}
|
||
|
|
#output {
|
||
|
|
display: none;
|
||
|
|
}
|
||
|
|
#status {
|
||
|
|
position: fixed;
|
||
|
|
bottom: 4px;
|
||
|
|
right: 8px;
|
||
|
|
font-size: 0.75em;
|
||
|
|
color: #444;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<canvas id="canvas" oncontextmenu="event.preventDefault()" tabindex="-1" width="1280" height="720"></canvas>
|
||
|
|
<div id="status">Loading...</div>
|
||
|
|
<textarea id="output" rows="8" style="display:none"></textarea>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
var Module = {
|
||
|
|
print: function(text) { console.log(text); },
|
||
|
|
printErr: function(text) { console.error(text); },
|
||
|
|
canvas: document.getElementById('canvas'),
|
||
|
|
setStatus: function(text) {
|
||
|
|
if (text) document.getElementById('status').textContent = text;
|
||
|
|
},
|
||
|
|
onRuntimeInitialized: function() {
|
||
|
|
document.getElementById('status').textContent = 'Press H for controls';
|
||
|
|
},
|
||
|
|
totalDependencies: 0,
|
||
|
|
monitorRunDependencies: function(left) {
|
||
|
|
this.totalDependencies = Math.max(this.totalDependencies, left);
|
||
|
|
if (left) {
|
||
|
|
Module.setStatus('Loading... (' + (this.totalDependencies - left) + '/' + this.totalDependencies + ')');
|
||
|
|
} else {
|
||
|
|
Module.setStatus('');
|
||
|
|
}
|
||
|
|
}
|
||
|
|
};
|
||
|
|
Module.setStatus('Downloading...');
|
||
|
|
</script>
|
||
|
|
{{{ SCRIPT }}}
|
||
|
|
</body>
|
||
|
|
</html>
|