memory leak problems with tetris poop

This commit is contained in:
Peter Harpending
2025-10-26 19:51:57 -07:00
parent 4bd279798c
commit 882a416831
19 changed files with 397 additions and 80 deletions
+30
View File
@@ -0,0 +1,30 @@
/**
* Tetris
*
* @module
*/
main();
async function main() {
let ws = new WebSocket("/ws/tetris");
let elt_tetris_state = document.getElementById('tetris-state');
ws.onmessage =
(e) => {
handle_evt(e, elt_tetris_state);
};
}
//-----------------------------------------------------
// Tetris
//-----------------------------------------------------
/**
* take the entire tetris state, render the html elements
*
* then fish out the element in the document, and replace it
*
* blitting basically
*/
async function handle_evt(e, oelt) {
let state_str = e.data;
oelt.value = state_str;
}
export {};
//# sourceMappingURL=tetris.js.map