mirror of
https://github.com/sotrh/learn-wgpu.git
synced 2024-11-16 06:12:55 +00:00
Merge pull request #409 from PhelixOchieng/master
Fix: Could not append canvas error when running on wasm
This commit is contained in:
commit
4f202d376d
@ -238,21 +238,21 @@ You'll then need to run the WASM code in an ES6 Module:
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Pong with WASM</title>
|
<title>Learn WGPU</title>
|
||||||
|
<style>
|
||||||
|
canvas {
|
||||||
|
background-color: black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body id="wasm-example">
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import init from "./pkg/pong.js";
|
import init from "./pkg/pong.js";
|
||||||
init().then(() => {
|
init().then(() => {
|
||||||
console.log("WASM Loaded");
|
console.log("WASM Loaded");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style>
|
|
||||||
canvas {
|
|
||||||
background-color: black;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user