diff mrjunejune/src/blog/wasm-bunny/index.md @ 185:dfdd66825396

Merged in keep alive changes and mrjunejune changes.
author MrJuneJune <me@mrjunejune.com>
date Fri, 23 Jan 2026 22:22:30 -0800
parents 8c74204fd362
children
line wrap: on
line diff
--- a/mrjunejune/src/blog/wasm-bunny/index.md	Fri Jan 23 21:09:49 2026 -0800
+++ b/mrjunejune/src/blog/wasm-bunny/index.md	Fri Jan 23 22:22:30 2026 -0800
@@ -84,3 +84,20 @@
 Overall, this was an interesting project to spend a few hours on, and maybe in the future, I’ll explore compiling the C3 standard library to WASM.
 
 Below are the results!
+
+<canvas id='bunnies'></canvas>
+<script src='/public/raylib.js'></script>
+<script>
+  async function startRaylib() {
+    if (typeof RaylibJs !== 'undefined') {
+      const raylibjs = new RaylibJs();
+      raylibjs.start({
+        wasmPath: '/public/bunny.wasm',
+        canvasId: 'bunnies',
+      });
+    } else {
+      console.error('RaylibJs is not loaded');
+    }
+  }
+  window.addEventListener('load', startRaylib);
+</script>