Skip to content

Commit

Permalink
Test pages
Browse files Browse the repository at this point in the history
  • Loading branch information
W2Wizard committed Oct 8, 2024
1 parent 75f7b14 commit bded3e3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 0 additions & 2 deletions web/.gitignore

This file was deleted.

1 change: 1 addition & 0 deletions web/demo.js

Large diffs are not rendered by default.

Binary file added web/demo.wasm
Binary file not shown.
12 changes: 5 additions & 7 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
body {
margin: 0;
width: 100%;
min-height: 100dvh; /* Fallback for browsers not supporting viewport height */
background-color: black; /* Set background color to black */
min-height: 100dvh;
background-color: black;
}
</style>
</head>
Expand All @@ -19,15 +19,13 @@
<canvas width="1024" height="1024" id="canvas"></canvas>
<script>
var Module = {
onRuntimeInitialized: function() {
// This is called when the Emscripten module is ready
// This is called when the Emscripten module is ready
onRuntimeInitialized: () => {
console.log("Emscripten module initialized");

// Hide loading text when canvas is fully loaded
var loadingText = document.querySelector('.load');
loadingText.style.display = 'none';
},
canvas: (function() {
canvas: (() => {
var canvas = document.getElementById('canvas');
canvas.addEventListener("webglcontextlost", function(e) {
alert('WebGL context lost. Reload the page.');
Expand Down

0 comments on commit bded3e3

Please sign in to comment.