From ee2554760d2089309b8567770a6fdbe0349aa374 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Thu, 27 May 2021 20:03:33 +0200 Subject: [PATCH] Run the formatter --- voicegardens/static/voicegardens.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/voicegardens/static/voicegardens.js b/voicegardens/static/voicegardens.js index 7e3f775..956caac 100644 --- a/voicegardens/static/voicegardens.js +++ b/voicegardens/static/voicegardens.js @@ -86,7 +86,7 @@ function sendToArchive() { var config = new Headers({ "Content-Type": "multipart/form-data" }); - axios.post(archiveUrl, formData, config).catch(function(error) { + axios.post(archiveUrl, formData, config).catch(function (error) { console.log( "Upload failed!", "Received the following message:", @@ -107,15 +107,15 @@ function gardenShapes() { */ axios .get(archiveListingUrl) - .then(function(response) { + .then(function (response) { if (!response.data.length) return; let randomIndex = floor(random(0, response.data.length - 1)); let url = response.data[randomIndex]; axios .get(url, { responseType: "blob" }) - .then(function(response) { + .then(function (response) { let data = new p5.File(response.data); - let sound = new p5.SoundFile(data, function() { + let sound = new p5.SoundFile(data, function () { let amp = sound.getPeaks(1)[0] * 100; let dur = sound.duration(); let shape = new GeneratedShape(sound, amp, dur); @@ -123,7 +123,7 @@ function gardenShapes() { shapes.push(shape); }); }) - .catch(function(error) { + .catch(function (error) { console.log( "Retrieving single recording from archive failed!", "Received the following message:", @@ -131,7 +131,7 @@ function gardenShapes() { ); }); }) - .catch(function(error) { + .catch(function (error) { console.log( "Retrieving archive listing failed!", "Received the following message:", @@ -391,7 +391,7 @@ class GeneratedShape { color("#CC3D25"), color("#A3614E"), color("#F0DBA9"), - color("#7C4531") + color("#7C4531"), ]; let index = floor(random(0, colourChoices.length)); @@ -533,7 +533,7 @@ function draw() { // build a new copy of the recording to store on the shape object let soundBlob = recording.getBlob(); let data = new p5.File(soundBlob); - let sound = new p5.SoundFile(data, function() { + let sound = new p5.SoundFile(data, function () { let amp = sound.getPeaks(1)[0] * 100; let dur = sound.duration(); let shape = new GeneratedShape(sound, amp, dur);