From 621c289ad5aa7a0cd5e46485542cff43eb1f7620 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 21 Feb 2018 14:56:38 +0100 Subject: etc --- client/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client/index.js') diff --git a/client/index.js b/client/index.js index 04b7f17..8f579aa 100644 --- a/client/index.js +++ b/client/index.js @@ -60,7 +60,7 @@ mouse.register({ down: (x, y) => { samplers['smash'].play(randrange(90, 150) + 50 * (x/window.innerWidth + y/window.innerHeight), 0) draw.clear() - draw.triangle(x, y, 400) + draw.triangle(x, y, isMobile ? Math.min(window.innerWidth, window.innerHeight) / 2 : 400) }, move: (x, y, dx, dy) => { let count = Math.abs(dx + dy) / (isMobile ? 5 : 40) @@ -69,7 +69,7 @@ mouse.register({ if (Math.abs(dx) + Math.abs(dy) > 100) { samplers['smash'].play(randrange(50, 300) + 100 * (x/window.innerWidth + y/window.innerHeight), 0) draw.clear() - draw.triangle(x, y, 500) + draw.triangle(x, y, isMobile ? Math.min(window.innerWidth, window.innerHeight) / 2 : 500) } let now = Tone.now() let when, i, player -- cgit v1.2.3-70-g09d2