font fix, blur, coloring controls
This commit is contained in:
parent
8511d8d2ec
commit
34c3030e13
5 changed files with 26 additions and 3 deletions
|
@ -35,6 +35,10 @@ class Color {
|
|||
static random() {
|
||||
return new Color(Math.random(), Math.random(), Math.random(), Math.random());
|
||||
}
|
||||
static randomGray() {
|
||||
let intensiviry = Math.random();
|
||||
return new Color(intensiviry, intensiviry, intensiviry, Math.random());
|
||||
}
|
||||
}
|
||||
|
||||
export default Color;
|
||||
|
|
|
@ -21,7 +21,7 @@ class Shape {
|
|||
return {
|
||||
x: Math.floor(Math.random() * this.maxX),
|
||||
y: Math.floor(Math.random() * this.maxY),
|
||||
color: Color.random()
|
||||
color: coloring ? Color.random() : Color.randomGray()
|
||||
}
|
||||
}
|
||||
static fromOptions(o) {
|
||||
|
@ -31,9 +31,13 @@ class Shape {
|
|||
maxX = w;
|
||||
maxY = h;
|
||||
}
|
||||
static setColoring(bool) {
|
||||
coloring = bool !== true;
|
||||
}
|
||||
}
|
||||
|
||||
let maxX = 1000;
|
||||
let maxY = 1000;
|
||||
let coloring = true;
|
||||
|
||||
export default Shape;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue