Skip to content

Commit

Permalink
🥚 Liven up dance parties
Browse files Browse the repository at this point in the history
  • Loading branch information
vegeta897 committed Nov 27, 2024
1 parent ed9702e commit 454b724
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/Board.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
let danceClickProgress = 0
async function danceClick(t: number) {
// TODO: Make all tiles start with a synchronized dance
if (!get(store.allowDancing)) return
if (canAnimate === null) canAnimate = animationSupported()
if (!canAnimate) return
Expand Down
2 changes: 1 addition & 1 deletion src/lib/idle-scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function getSchedule(id: string): IdleSchedule | { wait: number } {
? idlers / 2.5
: Math.min(idlers / randomInt(3, 5), ((Date.now() - scheduleBegin) / 1000 - 20) / 30)
if (!firstIdler && animating.size > maxAnimations)
return { wait: randomFloat(5000, idlers * 2 * 1000) }
return { wait: fastStart ? 250 : randomFloat(5000, idlers * 2 * 1000) }
const letter = randomElement(firstIdler ? firstLetterAlphabet : alphabet)
const schedule: IdleSchedule = { letter, animations: [] }
if (firstIdler || randomChance(0.95)) {
Expand Down

0 comments on commit 454b724

Please sign in to comment.