Browse Source

Take latest recording

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

3
voicegardens/static/voicegardens.js

@ -239,7 +239,7 @@ class GeneratedShape {
this.destY = random(windowHeight); this.destY = random(windowHeight);
// the sound recording attached to this shape // the sound recording attached to this shape
this.recording = recording; this.recording;
// the shape that was last collided with // the shape that was last collided with
this.lastCollidedShape; this.lastCollidedShape;
@ -451,6 +451,7 @@ function draw() {
// generate a new shape after a sound recording // generate a new shape after a sound recording
if (newSoundJustRecorded === true) { if (newSoundJustRecorded === true) {
let newShape = new GeneratedShape(); let newShape = new GeneratedShape();
newShape.recording = recording;
shapes.push(newShape); shapes.push(newShape);
addToFooterArchive(newShape); addToFooterArchive(newShape);
newSoundJustRecorded = false; newSoundJustRecorded = false;

Loading…
Cancel
Save