From 8b2b5fad25d04788936378d227fad434ec5bdeed Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Sat, 1 Feb 2020 13:42:57 +0100 Subject: [PATCH] Allow to create shape at random within window --- voicegardens/static/voicegardens.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/voicegardens/static/voicegardens.js b/voicegardens/static/voicegardens.js index 9f07fd3..6e0810a 100644 --- a/voicegardens/static/voicegardens.js +++ b/voicegardens/static/voicegardens.js @@ -174,8 +174,8 @@ class GeneratedShape { this.destX = random(canvasWidth); this.destY = random(canvasHeight); - this.centerX = centerX; - this.centerY = centerY; + this.centerX = random(windowWidth); + this.centerY = random(windowHeight); this.initialise(); }