play.core/tests/multi.html

49 wiersze
1.2 KiB
HTML
Executable File

<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="utf-8">
<title>Test multi</title>
<link rel="stylesheet" type="text/css" href="/css/simple_console.css">
<style type="text/css" media="screen">
body {
background-color: rgb(250, 250, 250);
margin:2em;
}
pre {
margin: 1em;
width: 40em;
height: 22em;
display: inline-block;
font-size: 1em;
line-height: 1.2;
font-family: 'Simple Console', monospace;
background-color: white;
}
</style>
</head>
<body>
<pre></pre>
<pre></pre>
<pre></pre>
<pre></pre>
<script type="module">
import { run } from '/src/run.js'
import * as prog0 from '/src/programs/basics/time_milliseconds.js'
import * as prog1 from '/src/programs/basics/cursor.js'
import * as prog2 from '/src/programs/sdf/balls.js'
import * as prog3 from '/src/programs/basics/time_frames.js'
const pre = document.querySelectorAll('pre')
run(prog0, { element : pre[0] } ).catch(errorHandler)
run(prog1, { element : pre[1] } ).catch(errorHandler)
run(prog2, { element : pre[2] } ).catch(errorHandler)
run(prog3, { element : pre[3] } ).catch(errorHandler)
function errorHandler(e) {
console.warn(e.message)
console.log(e.error)
}
</script>
</body>
</html>