window.ontouchmove = function(evt) { evt.preventDefault(); } function run() { var game = new Game(document.getElementById("canvas")); game.canvas.width = window.innerWidth; game.canvas.height = window.innerHeight; var worldgen = new WorldGen(game); game.start(worldgen); game.onstop = run; } run();