Fix wasm crashing on startup
This commit is contained in:
parent
7aa70cd564
commit
091bdcaa98
6 changed files with 41 additions and 15 deletions
13
index.html
13
index.html
|
@ -7,13 +7,16 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>wgpu-renderer</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: black;
|
||||
}
|
||||
canvas {
|
||||
background-color: black;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-width: 4px;
|
||||
min-height: 4px;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
#loading {
|
||||
color: white;
|
||||
|
@ -25,7 +28,7 @@
|
|||
</style>
|
||||
</head>
|
||||
|
||||
<body style="margin: 0; padding: 0">
|
||||
<body>
|
||||
<h1 id="loading">Loading...</h1>
|
||||
<script type="module">
|
||||
import init from "./pkg/wgpu_renderer.js";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue