From b6d08cf2844f1f9869bd45b445d0ebce7aa3d67a Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Sat, 1 Feb 2020 12:43:29 +0100 Subject: [PATCH] Revert to fixed window width --- voicegardens/static/voicegardens.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/voicegardens/static/voicegardens.js b/voicegardens/static/voicegardens.js index 4e44369..fa18f28 100644 --- a/voicegardens/static/voicegardens.js +++ b/voicegardens/static/voicegardens.js @@ -6,8 +6,8 @@ var archiveUrl = window.location + "add-to-archive"; var canvas; -var canvasHeight = 500; -var canvasWidth = 500; +var canvasHeight; +var canvasWidth; var centerX; var centerY; var frameRate = 30; @@ -304,8 +304,8 @@ function setup() { /** * The p5.js initial setup function. **/ - canvasWidth += windowWidth; - canvasHeight += windowHeight; + canvasWidth = windowWidth; + canvasHeight = windowHeight; createCanvas(canvasWidth, canvasHeight); frameRate(frameRate); @@ -375,7 +375,5 @@ function windowResized() { /** * Canvas re-draw handling. **/ - canvasWidth += windowWidth; - canvasHeight += windowHeight; resizeCanvas(canvasWidth, canvasHeight); }