From 9096a38f857da48b6a25aa965e5b084bf8d4065e Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Mon, 27 Jan 2020 11:06:25 +0100 Subject: [PATCH] Remove zoom/movement for now --- voicegardens/static/voicegardens.js | 34 ----------------------------- 1 file changed, 34 deletions(-) diff --git a/voicegardens/static/voicegardens.js b/voicegardens/static/voicegardens.js index 79fafa6..c92cefc 100644 --- a/voicegardens/static/voicegardens.js +++ b/voicegardens/static/voicegardens.js @@ -19,10 +19,6 @@ var screenX; var screenY; var shapes = []; var stopButton; -var toScreenX; -var toScreenY; -var zoom = 1; -var zoomSensitivity = 0.005; function record() { /** * Starting recording. @@ -223,8 +219,6 @@ function setup() { * The p5.js initial setup function. **/ createCanvas(windowWidth, windowHeight); - screenX = toScreenX = 0; - screenY = toScreenY = 0; setupRecording(); frameRate(frameRate); fill("#F38630"); @@ -236,12 +230,6 @@ function draw() { **/ background("#69D2E7"); - screenX = lerp(screenX, toScreenX, 0.1); - screenY = lerp(screenY, toScreenY, 0.1); - translate(screenX, screenY); - - scale(zoom); - if (newSoundJustRecorded === true) { shapes.push(new GeneratedShape()); newSoundJustRecorded = false; @@ -256,25 +244,3 @@ function draw() { } } } - -function mouseWheel(event) { - /** - * Mouse wheel zoom handling. - **/ - zoom += zoomSensitivity * event.delta; -} - -function mouseDragged() { - /** - * Mouse drag movement handling. - **/ - toScreenX += mouseX - pmouseX; - toScreenY += mouseY - pmouseY; -} - -function windowResized() { - /** - * Canvas re-draw handling. - **/ - resizeCanvas(windowWidth, windowHeight); -}