diff mrjunejune/src/blog/wasm-bunny/index.md @ 184:8c74204fd362

[MD to HTML] Updated so it can be used through readme to html
author MrJuneJune <me@mrjunejune.com>
date Fri, 23 Jan 2026 22:20:35 -0800
parents 295ac2e5ec00
children
line wrap: on
line diff
--- a/mrjunejune/src/blog/wasm-bunny/index.md	Fri Jan 23 21:19:08 2026 -0800
+++ b/mrjunejune/src/blog/wasm-bunny/index.md	Fri Jan 23 22:20:35 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>