INNER CODE UNIT · JavaScript
prev
rohitg00/k8sgames · js/engine/GameEngine.js:380
const prev = this._frameTimes[this._frameTimes.length - 2];
return last - prev;
}
_processInputQueue() {
while (this._inputQueue.length > 0) {
const input = this._inputQueue.shift();
this._executeCommand(input);
}
}
queueCommand(command) {
this._inputQueue.push({
...command,
timestamp: Date.now(),
});
}