Update #53 - Improved FPS, reduced WebGL context loss crashes

This commit is contained in:
lax1dude
2025-07-06 12:31:55 -07:00
parent f3281c037f
commit 332a7bb11f
53 changed files with 568 additions and 383 deletions

View File

@ -57,15 +57,15 @@ function initializeServerPlatfSP(spImports) {
/**
* @param {string} channel
* @param {Uint8Array} arr
* @param {number} addr
* @param {number} length
*/
spImports["sendPacket"] = function(channel, arr) {
const copiedArray = new Uint8Array(arr.length);
copiedArray.set(arr, 0);
spImports["sendPacket"] = function(channel, addr, length) {
const copiedArray = heapArrayBuffer.slice(addr, addr + length);
postMessage({
"ch": channel,
"dat": copiedArray.buffer
}, [copiedArray.buffer]);
"dat": copiedArray
}, [copiedArray]);
};
spImports["getAvailablePackets"] = serverMessageQueue.getLength.bind(serverMessageQueue);