mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Use .shift() instead
This commit is contained in:
Vendored
+2
-3
@@ -1844,13 +1844,12 @@ async function runWasm(wasmPath, consoleElement, extraForeignImports, wasmMemory
|
|||||||
const dt = (currTimeStamp - prevTimeStamp)*0.001;
|
const dt = (currTimeStamp - prevTimeStamp)*0.001;
|
||||||
prevTimeStamp = currTimeStamp;
|
prevTimeStamp = currTimeStamp;
|
||||||
|
|
||||||
for (let i = 0; i < eventQueue.length; i++) {
|
while (eventQueue.length > 0) {
|
||||||
let e = eventQueue[i];
|
let e = eventQueue.shift()
|
||||||
event_temp.data = e.event_data;
|
event_temp.data = e.event_data;
|
||||||
exports.odin_dom_do_event_callback(e.data, e.callback, odin_ctx);
|
exports.odin_dom_do_event_callback(e.data, e.callback, odin_ctx);
|
||||||
}
|
}
|
||||||
event_temp.data = null;
|
event_temp.data = null;
|
||||||
eventQueue.length = 0;
|
|
||||||
|
|
||||||
if (!exports.step(currTimeStamp*0.001, odin_ctx)) {
|
if (!exports.step(currTimeStamp*0.001, odin_ctx)) {
|
||||||
exports._end();
|
exports._end();
|
||||||
|
|||||||
Reference in New Issue
Block a user