545 lines
16 KiB
HTML
545 lines
16 KiB
HTML
<!doctype html>
|
|
<html lang="en-us">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="description" content="Cardinal" />
|
|
<meta name="theme-color" content="#111111">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1" user-scalable="no">
|
|
<title>Cardinal Synth</title>
|
|
<style>
|
|
html {
|
|
background-color: #111111;
|
|
color: #eee;
|
|
overflow: hidden;
|
|
}
|
|
body, canvas {
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
#canvas_file_open {
|
|
display: none;
|
|
}
|
|
|
|
#canvas_wrapper {
|
|
display: none;
|
|
image-rendering: pixelated;
|
|
image-rendering: crisp-edges;
|
|
position: absolute;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
}
|
|
|
|
/* automatically generated */
|
|
@media (min-resolution: 0.29dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 0.3);
|
|
left: 0;
|
|
top: calc((1 - (1 / 0.3)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 0.39dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 0.4);
|
|
left: 0;
|
|
top: calc((1 - (1 / 0.4)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 0.49dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 0.5);
|
|
left: 0;
|
|
top: calc((1 - (1 / 0.5)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 0.59dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 0.6);
|
|
left: 0;
|
|
top: calc((1 - (1 / 0.6)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 0.665dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 0.666);
|
|
left: 0;
|
|
top: calc((1 - (1 / 0.666)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 0.69dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 0.7);
|
|
left: 0;
|
|
top: calc((1 - (1 / 0.7)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 0.79dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 0.8);
|
|
left: 0;
|
|
top: calc((1 - (1 / 0.8)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 0.89dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 0.9);
|
|
left: 0;
|
|
top: calc((1 - (1 / 0.9)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 1.0dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 1.0);
|
|
left: calc((1 - (1 / 1.0)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 1.0)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 1.1dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 1.1);
|
|
left: calc((1 - (1 / 1.1)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 1.1)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 1.2dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 1.2);
|
|
left: calc((1 - (1 / 1.2)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 1.2)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 1.3dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 1.3);
|
|
left: calc((1 - (1 / 1.3)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 1.3)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 1.4dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 1.4);
|
|
left: calc((1 - (1 / 1.4)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 1.4)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 1.5dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 1.5);
|
|
left: calc((1 - (1 / 1.5)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 1.5)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 1.6dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 1.6);
|
|
left: calc((1 - (1 / 1.6)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 1.6)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 1.7dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 1.7);
|
|
left: calc((1 - (1 / 1.7)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 1.7)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 1.8dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 1.8);
|
|
left: calc((1 - (1 / 1.8)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 1.8)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 1.9dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 1.9);
|
|
left: calc((1 - (1 / 1.9)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 1.9)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 2.0dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 2.0);
|
|
left: calc((1 - (1 / 2.0)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 2.0)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 2.1dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 2.1);
|
|
left: calc((1 - (1 / 2.1)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 2.1)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 2.2dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 2.2);
|
|
left: calc((1 - (1 / 2.2)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 2.2)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 2.3dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 2.3);
|
|
left: calc((1 - (1 / 2.3)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 2.3)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 2.4dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 2.4);
|
|
left: calc((1 - (1 / 2.4)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 2.4)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 2.5dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 2.5);
|
|
left: calc((1 - (1 / 2.5)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 2.5)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 2.6dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 2.6);
|
|
left: calc((1 - (1 / 2.6)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 2.6)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 2.7dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 2.7);
|
|
left: calc((1 - (1 / 2.7)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 2.7)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 2.8dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 2.8);
|
|
left: calc((1 - (1 / 2.8)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 2.8)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 2.9dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 2.9);
|
|
left: calc((1 - (1 / 2.9)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 2.9)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 3.0dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 3.0);
|
|
left: calc((1 - (1 / 3.0)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 3.0)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 3.1dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 3.1);
|
|
left: calc((1 - (1 / 3.1)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 3.1)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 3.2dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 3.2);
|
|
left: calc((1 - (1 / 3.2)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 3.2)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 3.3dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 3.3);
|
|
left: calc((1 - (1 / 3.3)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 3.3)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 3.4dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 3.4);
|
|
left: calc((1 - (1 / 3.4)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 3.4)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 3.5dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 3.5);
|
|
left: calc((1 - (1 / 3.5)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 3.5)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 3.6dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 3.6);
|
|
left: calc((1 - (1 / 3.6)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 3.6)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 3.7dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 3.7);
|
|
left: calc((1 - (1 / 3.7)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 3.7)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 3.8dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 3.8);
|
|
left: calc((1 - (1 / 3.8)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 3.8)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 3.9dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 3.9);
|
|
left: calc((1 - (1 / 3.9)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 3.9)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 4.0dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 4.0);
|
|
left: calc((1 - (1 / 4.0)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 4.0)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 4.1dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 4.1);
|
|
left: calc((1 - (1 / 4.1)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 4.1)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 4.2dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 4.2);
|
|
left: calc((1 - (1 / 4.2)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 4.2)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 4.3dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 4.3);
|
|
left: calc((1 - (1 / 4.3)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 4.3)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 4.4dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 4.4);
|
|
left: calc((1 - (1 / 4.4)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 4.4)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 4.5dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 4.5);
|
|
left: calc((1 - (1 / 4.5)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 4.5)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 4.6dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 4.6);
|
|
left: calc((1 - (1 / 4.6)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 4.6)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 4.7dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 4.7);
|
|
left: calc((1 - (1 / 4.7)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 4.7)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 4.8dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 4.8);
|
|
left: calc((1 - (1 / 4.8)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 4.8)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 4.9dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 4.9);
|
|
left: calc((1 - (1 / 4.9)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 4.9)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
@media (min-resolution: 5.0dppx) {
|
|
#canvas_wrapper {
|
|
scale: calc(1 / 5.0);
|
|
left: calc((1 - (1 / 5.0)) / 2 * -100vw);
|
|
top: calc((1 - (1 / 5.0)) / 2 * -100vh);
|
|
}
|
|
}
|
|
|
|
.emscripten {
|
|
display: block;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
padding-right: 0;
|
|
text-align: center;
|
|
}
|
|
|
|
.spinner {
|
|
height: 50px;
|
|
width: 50px;
|
|
margin: 0px auto;
|
|
margin-top: 100px;
|
|
-webkit-animation: rotation .8s linear infinite;
|
|
-moz-animation: rotation .8s linear infinite;
|
|
-o-animation: rotation .8s linear infinite;
|
|
animation: rotation 0.8s linear infinite;
|
|
border-left: 10px solid rgb(0,150,240);
|
|
border-right: 10px solid rgb(0,150,240);
|
|
border-bottom: 10px solid rgb(0,150,240);
|
|
border-top: 10px solid rgb(100,0,200);
|
|
border-radius: 100%;
|
|
background-color: rgb(200,100,250);
|
|
}
|
|
@-webkit-keyframes rotation {
|
|
from {-webkit-transform: rotate(0deg);}
|
|
to {-webkit-transform: rotate(360deg);}
|
|
}
|
|
@-moz-keyframes rotation {
|
|
from {-moz-transform: rotate(0deg);}
|
|
to {-moz-transform: rotate(360deg);}
|
|
}
|
|
@-o-keyframes rotation {
|
|
from {-o-transform: rotate(0deg);}
|
|
to {-o-transform: rotate(360deg);}
|
|
}
|
|
@keyframes rotation {
|
|
from {transform: rotate(0deg);}
|
|
to {transform: rotate(360deg);}
|
|
}
|
|
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<figure style="overflow:visible;" id="spinner">
|
|
<div class="spinner"></div>
|
|
<center style="margin-top:0.5em"><strong>Cardinal</strong></center>
|
|
</figure>
|
|
<div class="emscripten" id="status">Downloading...</div>
|
|
<div class="emscripten">
|
|
<progress value="0" max="100" id="progress" hidden=1></progress>
|
|
</div>
|
|
<div id="canvas_wrapper">
|
|
<input type="file" id="canvas_file_open" ></input>
|
|
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" tabindex=-1></canvas>
|
|
</div>
|
|
|
|
<script type='text/javascript'>
|
|
var statusElement = document.getElementById('status');
|
|
var progressElement = document.getElementById('progress');
|
|
var spinnerElement = document.getElementById('spinner');
|
|
|
|
var Module = {
|
|
preRun: [],
|
|
postRun: function() {
|
|
var canvasWrapper = document.getElementById('canvas_wrapper');
|
|
canvasWrapper.style.display = 'block';
|
|
window.dispatchEvent(new Event('resize'));
|
|
},
|
|
canvas: (function() {
|
|
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", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);
|
|
|
|
return canvas;
|
|
})(),
|
|
setStatus: function(text) {
|
|
if (!Module.setStatus.last) Module.setStatus.last = { time: Date.now(), text: '' };
|
|
if (text === Module.setStatus.last.text) return;
|
|
var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
|
|
var now = Date.now();
|
|
if (m && now - Module.setStatus.last.time < 30) return; // if this is a progress update, skip it if too soon
|
|
Module.setStatus.last.time = now;
|
|
Module.setStatus.last.text = text;
|
|
if (m) {
|
|
text = m[1];
|
|
progressElement.value = parseInt(m[2])*100;
|
|
progressElement.max = parseInt(m[4])*100;
|
|
progressElement.hidden = false;
|
|
spinnerElement.hidden = false;
|
|
} else {
|
|
progressElement.value = null;
|
|
progressElement.max = null;
|
|
progressElement.hidden = true;
|
|
if (!text) spinnerElement.hidden = true;
|
|
}
|
|
statusElement.innerHTML = text;
|
|
},
|
|
totalDependencies: 0,
|
|
monitorRunDependencies: function(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 = function() {
|
|
Module.setStatus('Exception thrown, see JavaScript console');
|
|
spinnerElement.style.display = 'none';
|
|
Module.setStatus = function(text) {
|
|
if (text) console.error('[post-exception status] ' + text);
|
|
};
|
|
};
|
|
</script>
|
|
{{{ SCRIPT }}}
|
|
</body>
|
|
</html>
|