Skip to content

Commit

Permalink
More mobile stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
gamalielhere committed Jan 21, 2018
1 parent 87048ea commit 8db6744
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions js/script.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
(function() {
// Create canvas
const canvas = document.getElementById("canvas");
canvas.width = window.innerWidth - 30;
canvas.height = window.innerHeight / 2.5;
if(window.outerWidth > 960) {
canvas.width = Math.round(window.outerWidth / 3);
canvas.height = Math.round(window.outerWidth / 3);
} else {
canvas.width = Math.round(window.outerWidth / 1.15);
canvas.height = Math.round(window.outerWidth / 1.15);
}


const canvasContext = canvas.getContext("2d"),
canvasWidth = canvas.width,
Expand Down

0 comments on commit 8db6744

Please sign in to comment.