Skip to content

Commit

Permalink
Update background.js
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminHalko committed Dec 27, 2022
1 parent c4d3dae commit bc4c660
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ const animate = function () {
var interval = setInterval(animate, 1000 / frameRate);

function recolor() {
if (minHue > maxHue) maxHue += 360;
var tempMaxHue = maxHue;
if (minHue > maxHue) tempMaxHue += 360;
for (var i = 0; i < circles.length; i++) {
circles[i].color = minHue + Math.round(circles[i].colorRand * (maxHue - minHue));
circles[i].color = minHue + Math.round(circles[i].colorRand * (tempMaxHue - minHue));
}
}

Expand Down

0 comments on commit bc4c660

Please sign in to comment.