|
@ -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; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|