summaryrefslogtreecommitdiff
path: root/src/main.lua
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2024-12-22 21:30:49 -0600
committerAlexander M Pickering <alex@cogarr.net>2024-12-22 21:30:49 -0600
commit8fd93fad84e043def785e594b4745e56c88c5d48 (patch)
tree1c0dbb0070a660f52c5a0844f1d564af04d44914 /src/main.lua
parent00a3451004d664a5386f3750540facddc0d2686b (diff)
downloadggj25-8fd93fad84e043def785e594b4745e56c88c5d48.tar.gz
ggj25-8fd93fad84e043def785e594b4745e56c88c5d48.tar.bz2
ggj25-8fd93fad84e043def785e594b4745e56c88c5d48.zip
Start work on getting javascript to work
Diffstat (limited to 'src/main.lua')
-rw-r--r--src/main.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main.lua b/src/main.lua
index e69de29..176cddc 100644
--- a/src/main.lua
+++ b/src/main.lua
@@ -0,0 +1,14 @@
+
+print("Hello, world!")
+
+am.eval_js("console.log('Hello, js!')")
+
+local win = am.window{
+ title = "Hi",
+ width = 1280,
+ height = 720,
+ clear_color = vec4(0.8, 0.8, 0.3, 1)
+}
+print("about to pcall")
+local a,b = pcall(am.eval_js, require("js_bridge"))
+print("done with pcall", a,b)