Add support for PNG decoding (encoding still buggy)

This commit is contained in:
Surma
2020-09-16 23:59:06 +01:00
parent ef920ac6ba
commit 273b4211c9
15 changed files with 718 additions and 4 deletions

View File

@@ -1,10 +1,13 @@
export function instantiateEmscriptenWasm(factory, path) {
export function pathify(path) {
if (path.startsWith("file://")) {
path = path.slice("file://".length);
}
return path;
}
export function instantiateEmscriptenWasm(factory, path) {
return factory({
locateFile() {
return path;
return pathify(path);
}
});
}