From 5c0dbdfbeecddfdee38579ea3518bd963e9dff5c Mon Sep 17 00:00:00 2001 From: Boof <97455552+hexahigh@users.noreply.github.com> Date: Mon, 27 Mar 2023 11:55:53 +0200 Subject: [PATCH] update --- Games/move-cube/index.html | 2 +- Games/move-cube/js/draw.js | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Games/move-cube/index.html b/Games/move-cube/index.html index 7839ec2..74c25fb 100644 --- a/Games/move-cube/index.html +++ b/Games/move-cube/index.html @@ -5,7 +5,7 @@ -
+ \ No newline at end of file diff --git a/Games/move-cube/js/draw.js b/Games/move-cube/js/draw.js index 9f7fa78..3046a03 100644 --- a/Games/move-cube/js/draw.js +++ b/Games/move-cube/js/draw.js @@ -1,5 +1,5 @@ function setup() { - createCanvas(400, 400); + createCanvas(windowWidth, windowHeight); } var rectX = 200; @@ -7,7 +7,7 @@ var rectY = 200; function draw() { background(220); - rect(rectX, rectY, 40, 40, 20); + rect(rectX, rectY, 40, 40); //For (var BEGIN; END; INTERVAL){ //DO SOMETHING } for (var x = 0; x < width; x += width / 40) { @@ -41,4 +41,8 @@ function keyReleased() { } else if (keyCode == DOWN_ARROW) { rectY += 40; } -} \ No newline at end of file +} + +function windowResized() { + resizeCanvas(windowWidth, windowHeight); + } \ No newline at end of file