Browse Source

Add place holder for leaf generation

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

12
voicegardens/static/voicegardens.js

@ -134,6 +134,14 @@ function leaf_minimise() {
leafButton.position(20, 180); leafButton.position(20, 180);
} }
function gardenShapes() {
/*
* Re-generate a shape back into the environment. If we have reached the
* shape limit, then replace the first shape instead of adding one more. This
* has to do with performance.
*/
return;
}
function setupRecording() { function setupRecording() {
/** /**
@ -166,7 +174,7 @@ function setupRecording() {
leafButton.class("button"); leafButton.class("button");
leafButton.mouseOver(leaf_enlarge); leafButton.mouseOver(leaf_enlarge);
leafButton.mouseOut(leaf_minimise); leafButton.mouseOut(leaf_minimise);
leafButton.mousePressed(gardenShapes);
} }
class GeneratedShape { class GeneratedShape {
@ -473,9 +481,7 @@ function draw() {
let soundBlob = recording.getBlob(); let soundBlob = recording.getBlob();
let recordedSound = new p5.SoundFile(new p5.File(soundBlob)); let recordedSound = new p5.SoundFile(new p5.File(soundBlob));
let newShape = new GeneratedShape(recordedSound); let newShape = new GeneratedShape(recordedSound);
shapes.push(newShape); shapes.push(newShape);
newSoundJustRecorded = false; newSoundJustRecorded = false;
} }

Loading…
Cancel
Save