100% size canvas, add loading text
This commit is contained in:
parent
60d0f64356
commit
7aa70cd564
1 changed files with 14 additions and 0 deletions
14
index.html
14
index.html
|
@ -9,15 +9,29 @@
|
||||||
<style>
|
<style>
|
||||||
canvas {
|
canvas {
|
||||||
background-color: black;
|
background-color: black;
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
min-width: 4px;
|
||||||
|
min-height: 4px;
|
||||||
|
}
|
||||||
|
#loading {
|
||||||
|
color: white;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
right: 50%;
|
||||||
|
z-index: 100;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="margin: 0; padding: 0">
|
<body style="margin: 0; padding: 0">
|
||||||
|
<h1 id="loading">Loading...</h1>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import init from "./pkg/wgpu_renderer.js";
|
import init from "./pkg/wgpu_renderer.js";
|
||||||
init().then(() => {
|
init().then(() => {
|
||||||
console.log("WASM Loaded");
|
console.log("WASM Loaded");
|
||||||
|
document.getElementById("loading")?.remove();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue