Skip to content

Commit

Permalink
Docs updated
Browse files Browse the repository at this point in the history
  • Loading branch information
roma160 committed Jul 11, 2023
1 parent 5eaa9be commit 35db96c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
18 changes: 14 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@

<style>
#canvas {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
position: fixed;
}

html, body {
margin: 0 !important;
padding: 0 !important;
height: 1000px;
}
</style>
</head>
Expand All @@ -29,13 +30,22 @@

<!-- Allow the C++ to access the canvas element -->
<script type='text/javascript'>
//https://stackoverflow.com/a/57795495/8302811
let dark_mode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
if(dark_mode) {
document.body.style.backgroundColor = "black";
}

var Module = {
canvas: ( function () { return document.getElementById( 'canvas' ); } )()
canvas: ( function () { return document.getElementById( 'canvas' ); } )(),
// Uncomment this to enable mouse wheel
// arguments: ["--wheel"]
arguments: [dark_mode ? "--dark" : "--light"]
};
</script>

<!-- Add the javascript glue code (index.js) as generated by Emscripten -->
<script src="./main.js"></script>
<script async src="./main.js"></script>

</body>

Expand Down
2 changes: 1 addition & 1 deletion docs/main.js

Large diffs are not rendered by default.

Binary file modified docs/main.wasm
Binary file not shown.

0 comments on commit 35db96c

Please sign in to comment.