Browse Source

Store curveTightness on the shape

main
Luke Murphy 4 years ago
parent
commit
511ff89477
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 5
      voicegardens/static/voicegardens.js

5
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();

Loading…
Cancel
Save