diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-11-25 23:20:01 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-11-25 23:20:01 +0100 |
| commit | 72d70421ac7ec141a8a820c23cec54507b411dee (patch) | |
| tree | 9ed2ebab1028061fadf4df01c2426b2863130e56 /docs/js/shards.js | |
| parent | b9426877cfe30b74d03ec756b93bd047c402d7ad (diff) | |
mobile css
Diffstat (limited to 'docs/js/shards.js')
| -rw-r--r-- | docs/js/shards.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/js/shards.js b/docs/js/shards.js index 6512e70..28abca0 100644 --- a/docs/js/shards.js +++ b/docs/js/shards.js @@ -19,10 +19,12 @@ const shards = (function(){ document.querySelector('h1').addEventListener('click', () => { sounds.play('click') rebuild() + site.navigateHash('') + player.hidePlaylist() }) } function build(){ - count = choice([5,7,7,11,11,13,13]) + count = choice(is_mobile ? [5,7] : [5,7,7,11,11]) light = cielab.gradient(count) dark = cielab.gradient(count) let el @@ -69,7 +71,7 @@ const shards = (function(){ function step() { t += 1 light = cielab.gradient(count) - let w = { min: randrange(20, 40), max: randrange(10, 90) } + let w = { min: is_mobile ? randrange(40, 90) : randrange(20, 40), max: randrange(10, 90) } if (w.min > w.max) { w.min += 10 } |
