mirror of
https://github.com/felixrieseberg/macintosh.js.git
synced 2024-06-16 13:29:28 +00:00
21 lines
454 B
JavaScript
21 lines
454 B
JavaScript
const { drawScreen } = require("./screen");
|
|
const { openAudio } = require("./audio");
|
|
const { tryToSendInput } = require("./input");
|
|
const { registerWorker, setCanvasBlank } = require("./worker");
|
|
const { setupDialogs } = require("./dialogs");
|
|
|
|
function asyncLoop() {
|
|
drawScreen();
|
|
tryToSendInput();
|
|
requestAnimationFrame(asyncLoop);
|
|
}
|
|
|
|
async function start() {
|
|
await registerWorker();
|
|
setupDialogs();
|
|
openAudio();
|
|
asyncLoop();
|
|
}
|
|
|
|
start();
|