diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-02-21 14:56:38 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-02-21 14:56:38 +0100 |
| commit | 621c289ad5aa7a0cd5e46485542cff43eb1f7620 (patch) | |
| tree | 2ac6ab5aa3858854d2d4805117271a5eb5b74e5b /client | |
| parent | 30c73e04f6d60955f68ef0e93176a6ebc24ef40f (diff) | |
etc
Diffstat (limited to 'client')
| -rw-r--r-- | client/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
