Skip to content

Commit

Permalink
Builds with vite now
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesTaylor7 committed May 3, 2024
1 parent da866c4 commit 493e985
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 27 deletions.
15 changes: 9 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script type="module">
import init, { render, on_key_down, on_key_up } from "/pkg/look_how_they_truncated_my_boy.js";
await init();
function loop(ms) {
render(ms);
async function main() {
await init();
function loop(ms) {
render(ms);
requestAnimationFrame(loop);
}
document.addEventListener("keydown", on_key_down);
document.addEventListener("keyup", on_key_up);
requestAnimationFrame(loop);
}
document.addEventListener("keydown", on_key_down);
document.addEventListener("keyup", on_key_up);
requestAnimationFrame(loop);
main()
</script>
<style>
html,
Expand Down
21 changes: 0 additions & 21 deletions tsconfig.json

This file was deleted.

1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ import { defineConfig } from "vite";

export default defineConfig({
base: "/webgl/",
//root: "pkg",
});

0 comments on commit 493e985

Please sign in to comment.