From 511ff89477a571ef5dc7ac9bd194b8c63eb442ec Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Fri, 31 Jan 2020 18:11:34 +0100 Subject: [PATCH] Store curveTightness on the shape --- voicegardens/static/voicegardens.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/voicegardens/static/voicegardens.js b/voicegardens/static/voicegardens.js index ed500a5..9572141 100644 --- a/voicegardens/static/voicegardens.js +++ b/voicegardens/static/voicegardens.js @@ -152,6 +152,8 @@ class GeneratedShape { this.opacity = 0; this.colour = this.chooseColour(); + + this.curveTightness = -5; } collide(shapes) { @@ -258,8 +260,7 @@ class GeneratedShape { /*function for drawing the shape on the screen*/ createShape() { - let organicConstant = floor(random(-5, 5)); - curveTightness(organicConstant); + curveTightness(this.curveTightness); beginShape();