New Effect: BigDynamicEffect.
This commit is contained in:
parent
26df11fc47
commit
90c0df093e
@ -34,3 +34,28 @@ void MultiDynamicEffect::loop() {
|
||||
}
|
||||
this->draw();
|
||||
}
|
||||
|
||||
BigDynamicEffect::~BigDynamicEffect() {
|
||||
delete window;
|
||||
}
|
||||
|
||||
void BigDynamicEffect::loop() {
|
||||
EVERY_N_MILLISECONDS( EFFECT_BIG_DYNAMIC_LOOP_TIME ) {
|
||||
uint8_t x = random8(0, window->width - EFFECT_BIG_DYNAMIC_SIZE + 1);
|
||||
uint8_t y = random8(0, window->height - EFFECT_BIG_DYNAMIC_SIZE + 1);
|
||||
CRGB color = CHSV(random8(), 255, 255);
|
||||
CRGB black(0x000000);
|
||||
|
||||
for (uint8_t ix=0; ix<EFFECT_BIG_DYNAMIC_SIZE; ix++) for (uint8_t iy=0; iy<EFFECT_BIG_DYNAMIC_SIZE; iy++) {
|
||||
window->setPixel(x+ix, y+iy, &color);
|
||||
}
|
||||
/*for (uint8_t ix=0; ix<EFFECT_BIG_DYNAMIC_SIZE+2; ix++) {
|
||||
window->setPixel(x-1+ix, y-1, &black);
|
||||
window->setPixel(x-1+ix, y+EFFECT_BIG_DYNAMIC_SIZE+1, &black);
|
||||
}
|
||||
for (uint8_t iy=0; iy<EFFECT_BIG_DYNAMIC_SIZE+2; iy++) {
|
||||
window->setPixel(x-1, y-1+iy, &black);
|
||||
window->setPixel(x+EFFECT_BIG_DYNAMIC_SIZE+1, y-1+iy, &black);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user