Skip to content

Commit 81f8483

Browse files
author
Gabriel Doty
committed
randomize speed
1 parent d286ccb commit 81f8483

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

public/js/home.controller.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -430,14 +430,22 @@ var pollInterval = setInterval(
430430
}, 15000
431431
);
432432

433+
function random_boolean() {
434+
return Math.random() >= 0.5;
435+
}
436+
433437
var queueInterval = setInterval(
434438
function() {
435439
if (circleQueue.length > 0) {
436440
activateCircle(circleQueue[0]);
437441

438442
circleQueue.shift();
443+
444+
if (random_boolean()) {
445+
circleQueue.shift();
446+
}
439447
}
440-
}, 500
448+
}, 200
441449
);
442450

443451
setTimeout(

0 commit comments

Comments
 (0)