Mercurial
comparison mrjunejune/src/blog/wasm-bunny/index.html @ 169:295ac2e5ec00
[MrJuneJune] Created separate target for generating html from md.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 19 Jan 2026 17:33:18 -0800 |
| parents | 65e5a5b89a4e |
| children | 8c74204fd362 |
comparison
equal
deleted
inserted
replaced
| 168:f3084bca7317 | 169:295ac2e5ec00 |
|---|---|
| 1 <!DOCTYPE html> | 1 (binary file text/html, hash: f030b2cc9dcf8a298ac96a8e40c97958858ce703) |
| 2 <html lang="en"> | |
| 3 <head> | |
| 4 <meta charset="UTF-8"> | |
| 5 <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| 6 <title>WASM using c3</title> | |
| 7 {{/parts/base_head.html}} | |
| 8 <link rel="stylesheet" href="/tools/markdown_to_html/index.css" /> | |
| 9 </head> | |
| 10 <body> | |
| 11 {{/parts/header.html}} | |
| 12 <main> | |
| 13 <div id="content"></div> | |
| 14 <div style="display: flex; justify-content: center; align-items: center; height: 100vh;"> | |
| 15 <canvas id='bunnies'></canvas> | |
| 16 </div> | |
| 17 </main> | |
| 18 {{/parts/footer.html}} | |
| 19 <script src="/markdown_to_html.js"></script> | |
| 20 <script> | |
| 21 fetch('/blog/wasm-bunny/index.md').then(res => res.text()).then(text => renderMarkdown(content, text)); | |
| 22 </script> | |
| 23 <script src='/public/raylib.js'></script> | |
| 24 <script> | |
| 25 async function startRaylib() { | |
| 26 if (typeof RaylibJs !== 'undefined') { | |
| 27 const raylibjs = new RaylibJs(); | |
| 28 raylibjs.start({ | |
| 29 wasmPath: '/public/bunny.wasm', | |
| 30 canvasId: 'bunnies', | |
| 31 }); | |
| 32 } else { | |
| 33 console.error('RaylibJs is not loaded'); | |
| 34 } | |
| 35 } | |
| 36 | |
| 37 // Ensure raylib.js is loaded, then initialize | |
| 38 window.addEventListener('load', startRaylib); | |
| 39 </script> | |
| 40 </body> |