From db204364816d7c11d3faf498db6783aaec232412 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Tue, 1 Jun 2021 18:45:15 +0200 Subject: [PATCH] Drop lerp and move setup into setup --- voicegardens/static/voicegardens.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/voicegardens/static/voicegardens.js b/voicegardens/static/voicegardens.js index e035b1e..9302877 100644 --- a/voicegardens/static/voicegardens.js +++ b/voicegardens/static/voicegardens.js @@ -569,22 +569,16 @@ function setup() { setupRecording(); bgColour = color("#C3EFDB"); + background(bgColour); + blendMode(BLEND); + smooth(); + noStroke(); } function draw() { /** * The draw loop which is called x times a second where x is the frameRate. **/ - background(bgColour); - blendMode(BLEND); - smooth(); - noStroke(); - - // offset the window view based on new values of x,y related to the screen. - // These values are generated once the user drags the screen with the mouse. - screenX = lerp(screenX, toScreenX, 0.2); - screenY = lerp(screenY, toScreenY, 0.2); - translate(screenX, screenY); // generate a new shape after a sound recording if (newSoundJustRecorded === true) {