|
5 years ago | |
---|---|---|
.gitignore | 5 years ago | |
LICENSE | 5 years ago | |
Makefile | 5 years ago | |
README.md | 5 years ago | |
bng.h | 5 years ago | |
bng.html | 5 years ago | |
bng.js | 5 years ago | |
bng.wat.in | 5 years ago | |
bng_test.c | 5 years ago | |
bngviewer.c | 5 years ago | |
png2bng.c | 5 years ago | |
stb_image.h | 5 years ago | |
tsodinw.png | 5 years ago |
$ make -B
$ python -m SimpleHTTPServer 8080
$ iexplorer.exe http://localhost:8080/bng.html
[x] Implement bng support in WASM
[x] fetch("tsodinw.bng"):
fetch("./tsodinw.bng").then((x) => console.log(x.arrayBuffer()))
[x] Put the fetched file into WASM memory
let bngFile = await fetch("tsodinw.bng");
let fileData = await bngFile.arrayBuffer();
let memory = new WebAssembly.Memory({initial: 10, maximum: 10});
new Uint8Array(memory.buffer).set(new Uint8Array(fileData));
[x] Call a WASM function that turns the file into Image Data
[x] Take out the Image Data from WASM memory and display it
[x] Add more interesting features to bng to test the support
[ ] Reusable BNG library that works both natively and being compiled to WASM
[ ] img tag integration