Allow for arbitrary length colour arrays

master
William Toohey 9 years ago
parent a7a8b524a7
commit 3aa604abb5
  1. 2
      src/js/HuesCore.js

@ -690,7 +690,7 @@ HuesCore.prototype.previousImage = function() {
}; };
HuesCore.prototype.randomColourIndex = function() { HuesCore.prototype.randomColourIndex = function() {
let index=Math.floor((Math.random() * 64)); let index=Math.floor((Math.random() * this.colours.length));
if (index == this.colourIndex) { if (index == this.colourIndex) {
return this.randomColourIndex(); return this.randomColourIndex();
} }

Loading…
Cancel
Save