@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
canvas {
|
||||
width: 90%;
|
||||
height: 300px;
|
||||
background-color: yellowgreen;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav>
|
||||
<ul>
|
||||
</ul>
|
||||
</nav>
|
||||
<h1 class="title">Enjoy WebGPU + WASM + Webpack with 🍰☕</h1>
|
||||
</header>
|
||||
<main>
|
||||
<section>
|
||||
<!-- TODO: Intro -->
|
||||
</section>
|
||||
<section>
|
||||
<canvas id="canvas0"></canvas>
|
||||
<script type="module" src="./index.js"></script>
|
||||
</section>
|
||||
</main>
|
||||
<footer>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
import wbg_init, { main, App } from "../pkg/wasm-index.js";
|
||||
|
||||
const start = async () => {
|
||||
await wbg_init();
|
||||
|
||||
main();
|
||||
const app = new App();
|
||||
};
|
||||
|
||||
start();
|
||||
Reference in New Issue
Block a user