diff --git a/voicegardens/static/voicegardens.js b/voicegardens/static/voicegardens.js index 66d1fe2..7153aee 100644 --- a/voicegardens/static/voicegardens.js +++ b/voicegardens/static/voicegardens.js @@ -134,6 +134,14 @@ function leaf_minimise() { 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() { /** @@ -166,7 +174,7 @@ function setupRecording() { leafButton.class("button"); leafButton.mouseOver(leaf_enlarge); leafButton.mouseOut(leaf_minimise); - + leafButton.mousePressed(gardenShapes); } class GeneratedShape { @@ -473,9 +481,7 @@ function draw() { let soundBlob = recording.getBlob(); let recordedSound = new p5.SoundFile(new p5.File(soundBlob)); let newShape = new GeneratedShape(recordedSound); - shapes.push(newShape); - newSoundJustRecorded = false; }