Render WASM dashboard thumbnails

This commit is contained in:
alonso.torres
2025-11-19 17:10:11 +01:00
parent b8c0c5c310
commit 59845b756f
11 changed files with 400 additions and 169 deletions

View File

@@ -1,8 +1,16 @@
addToLibrary({
wapi_requestAnimationFrame: function wapi_requestAnimationFrame() {
return window.requestAnimationFrame(Module._process_animation_frame);
if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) {
setTimeout(Module._process_animation_frame);
} else {
return window.requestAnimationFrame(Module._process_animation_frame);
}
},
wapi_cancelAnimationFrame: function wapi_cancelAnimationFrame(frameId) {
return window.cancelAnimationFrame(frameId);
if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) {
clearTimeout(frameId);
} else {
return window.cancelAnimationFrame(frameId);
}
}
});