Mercurial
annotate mrjunejune/src/blog/wasm-bunny/index.html @ 100:65e5a5b89a4e
[Seobeo] Migrated everything to this page.
| author | June Park <parkjune1995@gmail.com> |
|---|---|
| date | Sat, 03 Jan 2026 07:48:07 -0800 |
| parents | |
| children | 295ac2e5ec00 |
| rev | line source |
|---|---|
|
100
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
1 <!DOCTYPE html> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
2 <html lang="en"> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
3 <head> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
4 <meta charset="UTF-8"> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
5 <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
6 <title>WASM using c3</title> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
7 {{/parts/base_head.html}} |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
8 <link rel="stylesheet" href="/tools/markdown_to_html/index.css" /> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
9 </head> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
10 <body> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
11 {{/parts/header.html}} |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
12 <main> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
13 <div id="content"></div> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
14 <div style="display: flex; justify-content: center; align-items: center; height: 100vh;"> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
15 <canvas id='bunnies'></canvas> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
16 </div> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
17 </main> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
18 {{/parts/footer.html}} |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
19 <script src="/markdown_to_html.js"></script> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
20 <script> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
21 fetch('/blog/wasm-bunny/index.md').then(res => res.text()).then(text => renderMarkdown(content, text)); |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
22 </script> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
23 <script src='/public/raylib.js'></script> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
24 <script> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
25 async function startRaylib() { |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
26 if (typeof RaylibJs !== 'undefined') { |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
27 const raylibjs = new RaylibJs(); |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
28 raylibjs.start({ |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
29 wasmPath: '/public/bunny.wasm', |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
30 canvasId: 'bunnies', |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
31 }); |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
32 } else { |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
33 console.error('RaylibJs is not loaded'); |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
34 } |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
35 } |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
36 |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
37 // Ensure raylib.js is loaded, then initialize |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
38 window.addEventListener('load', startRaylib); |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
39 </script> |
|
65e5a5b89a4e
[Seobeo] Migrated everything to this page.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
40 </body> |