mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-04 03:45:58 -05:00
Define Color.random() similar to Point.random().
This commit is contained in:
parent
398ee1a338
commit
9ff39eb603
1 changed files with 4 additions and 0 deletions
|
@ -334,6 +334,10 @@ var Color = this.Color = Base.extend(new function() {
|
|||
}, src);
|
||||
}
|
||||
return this.base(src);
|
||||
},
|
||||
|
||||
random: function() {
|
||||
return new RgbColor(Math.random(), Math.random(), Math.random());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue