New situation now has new bg color, same s/b
This commit is contained in:
parent
058f4023ea
commit
ff9cd0e0f1
@ -5,14 +5,6 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
// rectangles have width between 2 and 50 pixels
|
|
||||||
// rectangles have color black, white, or sand
|
|
||||||
// background is pastel green
|
|
||||||
// rectangles are placed on a grid where they're centered on grid points
|
|
||||||
// grid points have 75 pixels in between
|
|
||||||
// screensize therefore determines grid, which should be centered
|
|
||||||
// after some time, a new random setup is chosen, and we animate to the new situation
|
|
||||||
|
|
||||||
const std::string black {"#000000"};
|
const std::string black {"#000000"};
|
||||||
const std::string white {"#FFFFFF"};
|
const std::string white {"#FFFFFF"};
|
||||||
const std::string sand {"#B69061"};
|
const std::string sand {"#B69061"};
|
||||||
@ -136,6 +128,8 @@ void Grid::update() {
|
|||||||
r.width = random_between(_min_size, _max_size);
|
r.width = random_between(_min_size, _max_size);
|
||||||
r.color = sc::random::choice(_colors);
|
r.color = sc::random::choice(_colors);
|
||||||
}
|
}
|
||||||
|
HSB newbg {random_between(0, 360), 0.16, 0.82};
|
||||||
|
_new.bg = newbg;
|
||||||
_s = State::wait;
|
_s = State::wait;
|
||||||
} else {
|
} else {
|
||||||
animate();
|
animate();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user