-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
29 lines (26 loc) · 836 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + TS</title>
</head>
<body>
<canvas id="canvas" style="border: 1px solid black; height: 420px"></canvas>
<script type="module">
import { SceneController } from "./src/index";
import UserScene from "./userScene/main.ts";
const canvas = document.querySelector("#canvas");
if (canvas === null) {
throw new Error("canvas is null");
}
const sceneController = new SceneController(UserScene, canvas, {
aspectRatio: 16 / 9,
pixelHeight: 720,
coordinateHeight: 8,
});
sceneController.play();
</script>
</body>
</html>