diff --git a/src/game.js b/src/game.js index 3c9709c..50ffaef 100644 --- a/src/game.js +++ b/src/game.js @@ -252,9 +252,19 @@ function setup() { // Create canvas and put it in the canvas div to guess the size textFont("Cabin Sketch"); imageMode(CENTER); - createCanvas(Game.board.size.width, Game.board.size.height).parent("#canvas"); + c = createCanvas(Game.board.size.width, Game.board.size.height).parent( + "#canvas" + ); windowResized(); + const scroll = () => { + window.scrollBy({ + top: c.elt.getBoundingClientRect().top - 10, + behavior: "smooth", + }); + }; + setTimeout(scroll, 100); + //startGame(); }