
    screen.draw(app.render());
    requestAnimationFrame(loop);

    document.querySelector('#canvas').addEventListener('pointerdown', (_) => { thrust = true; });
    document.addEventListener('pointerup', (_) => { thrust = false; });
}

function loop() {
    const now = Date.now();
    app.step((now - time) / 1000, thrust);
    time = now;
    screen.draw(app.render());
    requestAnimationFrame(loop);
}

main();

        </script>
    </body>
</html>
