aboutsummaryrefslogtreecommitdiff
path: root/src/main.ts
diff options
context:
space:
mode:
authorJoris2021-02-14 20:25:55 +0100
committerJoris2021-02-14 20:25:55 +0100
commitf47b2e3f68e69238b731d6183e739805db20ae5b (patch)
tree2eaa3937cdec3dccf4e751f9b519833740e69aca /src/main.ts
parent0b60fd8c2cf5746a45cea137d2eac918ca7a8307 (diff)
Control a ship that can fire missiles
Diffstat (limited to 'src/main.ts')
-rw-r--r--src/main.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main.ts b/src/main.ts
new file mode 100644
index 0000000..53bc487
--- /dev/null
+++ b/src/main.ts
@@ -0,0 +1,11 @@
+import * as Scene from 'view/scene'
+
+let scene: Scene.State = Scene.init()
+
+function loop(timestamp: number) {
+ Scene.update(scene, timestamp)
+ Scene.view(scene)
+ window.requestAnimationFrame(loop)
+}
+
+window.requestAnimationFrame(loop)