From 9a9a72bf212b51c5b167174492e8b41f98835b26 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Wed, 5 Feb 2020 11:04:07 +0100 Subject: [PATCH] Shapes follow the mouse now --- voicegardens/static/voicegardens.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/voicegardens/static/voicegardens.js b/voicegardens/static/voicegardens.js index c9b6140..f1a66fe 100644 --- a/voicegardens/static/voicegardens.js +++ b/voicegardens/static/voicegardens.js @@ -347,8 +347,8 @@ class GeneratedShape { /** * Move the shape vectors. **/ - this.deltaX = mouseX - this.centerX; - this.deltaY = mouseY - this.centerY; + this.deltaX = mouseX - this.centerX - toScreenX; + this.deltaY = mouseY - this.centerY - toScreenY; this.deltaX *= this.springing; this.deltaY *= this.springing;