summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorMitchell Hashimoto <mitchell.hashimoto@gmail.com>2022-11-30 15:05:09 -0800
committerMitchell Hashimoto <mitchell.hashimoto@gmail.com>2022-12-01 13:02:17 -0800
commitb858aea1241206fa2d2c510a0ef13017a31d7b6d (patch)
tree6a3d52355b47af0144d97f4fb8b89f45fc2ee682 /example
parent6b101c22930673b781f351936664cc1e7f59d392 (diff)
Start scaffolding web_canvas backend
Diffstat (limited to 'example')
-rw-r--r--example/index.html19
1 files changed, 11 insertions, 8 deletions
diff --git a/example/index.html b/example/index.html
index f93da37d7..314a78cb1 100644
--- a/example/index.html
+++ b/example/index.html
@@ -13,21 +13,24 @@
}
};
- fetch('ghostty-term.wasm').then(response =>
+ fetch('ghostty-wasm.wasm').then(response =>
response.arrayBuffer()
).then(bytes =>
WebAssembly.instantiate(bytes, importObject)
).then(results => {
const {
- terminal_new,
- terminal_free,
- terminal_print,
+ atlas_new,
+ atlas_free,
+ atlas_reserve,
+ free,
+ memory,
} = results.instance.exports;
- const term = terminal_new(80, 80);
- console.log(term);
- terminal_free(term);
- terminal_print('a');
+ const atlas = atlas_new(512, 0);
+ const reg = atlas_reserve(atlas, 10, 10);
+ console.log(reg);
+ free(reg);
+ atlas_free(atlas);
});
</script>
</body>