summaryrefslogtreecommitdiff
path: root/docs/js/shards.js
diff options
context:
space:
mode:
Diffstat (limited to 'docs/js/shards.js')
-rw-r--r--docs/js/shards.js6
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
}