Complete options panel

This commit is contained in:
2015-01-11 15:13:07 -05:00
parent 759e202a38
commit 3671e5c7fc
4 changed files with 67 additions and 4 deletions

View File

@@ -31,6 +31,9 @@ var Magic = function (options) {
// Average length of new spline (branch)
this.splineLength = options.splineLength || 15;
// Whether new spells are cast with a new random color
this.randomColored = options.randomColored || true;
this.paused = false;
// Save this query here now that the page is loaded
@@ -174,8 +177,11 @@ Magic.prototype.cast = function(x, y, angle, chain) {
angle = Math.random() * 360;
}
var color = this.pickRandomColor();
var colorString = "rgb(" + color.r + "," + color.g + "," + color.b + ")";
var colorString = "rgb(10,10,10)";
if (this.randomColored) {
var color = this.pickRandomColor();
colorString = "rgb(" + color.r + "," + color.g + "," + color.b + ")";
}
// Create new spell (branch)
this.spells.push({