mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-14 07:30:21 +00:00
Passes the window width/height as the requested geometry to lde at startup. Since we control the directory structure of the file-system, we can pass the known fixed location of the Medley directories in the MEDLEYDIR environment variable. Sets up the NetHub host as localhost - not currenty functional, but a WebSocket server could be added to communicate with the NetHub gateway to enable local networking from the browser version of Medley.
25 lines
975 B
HTML
25 lines
975 B
HTML
<!doctype html>
|
|
<!-- Based on https://github.com/timhutton/sdl-canvas-wasm/blob/main/index.html -->
|
|
<!-- html to set up WebAssembly module for Medley running in a browser -->
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
</head>
|
|
<body>
|
|
<div style="text-align: center;">
|
|
<canvas id="canvas" oncontextmenu="event.preventDefault()"></canvas>
|
|
</div>
|
|
<script type="text/javascript">
|
|
var width = 32*Math.trunc(Math.min(Math.max(window.innerWidth, 512), 1664)/32);
|
|
var height = Math.min(Math.max(window.innerHeight, 512), 1260);
|
|
var Module = {
|
|
preRun: [ function() {ENV.MEDLEYDIR = "{DSK}<medley>";} ],
|
|
arguments: ["medley/loadups/full.sysout","-sc", width+"x"+height, "-nh-host", "127.0.0.1"],
|
|
canvas: (function() { return document.getElementById('canvas'); })()
|
|
};
|
|
</script>
|
|
<script src="ldesdl.js"></script>
|
|
</body>
|
|
</html>
|