Initial web support
This commit is contained in:
parent
4cd9f5acc3
commit
cbcda28719
17 changed files with 238 additions and 143 deletions
39
index.html
Normal file
39
index.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body,
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#canvas {
|
||||
width: 100vw;
|
||||
height: 56.25vw; /* height:width ratio = 9/16 = .5625 */
|
||||
background: pink;
|
||||
max-height: 100vh;
|
||||
max-width: 177.78vh; /* 16/9 = 1.778 */
|
||||
margin: auto;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0; /* vertical center */
|
||||
left: 0;
|
||||
right: 0; /* horizontal center */
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<canvas id="canvas"></canvas>
|
||||
<script src="./kroz.js"></script>
|
||||
<script>
|
||||
window.addEventListener("load", async () => {
|
||||
await wasm_bindgen("./kroz_bg.wasm");
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue