Waving Cell FX
This commit is contained in:
parent
f0dade5856
commit
61eb7b0a6a
@ -7546,6 +7546,24 @@ uint16_t mode_2Doctopus() {
|
|||||||
static const char _data_FX_MODE_2DOCTOPUS[] PROGMEM = "Octopus@!,!,,,Legs;;!;2;ix=255";
|
static const char _data_FX_MODE_2DOCTOPUS[] PROGMEM = "Octopus@!,!,,,Legs;;!;2;ix=255";
|
||||||
|
|
||||||
|
|
||||||
|
//Waving Cell
|
||||||
|
//@Stepko (https://editor.soulmatelights.com/gallery/1704-wavingcells)
|
||||||
|
// adapted for WLED by @blazoncek
|
||||||
|
uint16_t mode_2Dwavingcell() {
|
||||||
|
if (!strip.isMatrix) return mode_static(); // not a 2D set-up
|
||||||
|
|
||||||
|
const uint16_t cols = SEGMENT.virtualWidth();
|
||||||
|
const uint16_t rows = SEGMENT.virtualHeight();
|
||||||
|
|
||||||
|
uint32_t t = millis()/(256-SEGMENT.speed);
|
||||||
|
for (int x = 0; x < cols; x++) for (int y = 0; y <rows; y++)
|
||||||
|
SEGMENT.setPixelColorXY(x, y, ColorFromPalette(SEGPALETTE, ((sin8((x*10)+sin8((y+t)*5))+cos8(y*10))+1)+t));
|
||||||
|
|
||||||
|
return FRAMETIME;
|
||||||
|
}
|
||||||
|
static const char _data_FX_MODE_2DWAVINGCELL[] PROGMEM = "Waving Cell@!;;!;2";
|
||||||
|
|
||||||
|
|
||||||
#endif // WLED_DISABLE_2D
|
#endif // WLED_DISABLE_2D
|
||||||
|
|
||||||
|
|
||||||
@ -7781,6 +7799,7 @@ void WS2812FX::setupEffectData() {
|
|||||||
addEffect(FX_MODE_2DBLACKHOLE, &mode_2DBlackHole, _data_FX_MODE_2DBLACKHOLE);
|
addEffect(FX_MODE_2DBLACKHOLE, &mode_2DBlackHole, _data_FX_MODE_2DBLACKHOLE);
|
||||||
addEffect(FX_MODE_2DSOAP, &mode_2Dsoap, _data_FX_MODE_2DSOAP);
|
addEffect(FX_MODE_2DSOAP, &mode_2Dsoap, _data_FX_MODE_2DSOAP);
|
||||||
addEffect(FX_MODE_2DOCTOPUS, &mode_2Doctopus, _data_FX_MODE_2DOCTOPUS);
|
addEffect(FX_MODE_2DOCTOPUS, &mode_2Doctopus, _data_FX_MODE_2DOCTOPUS);
|
||||||
|
addEffect(FX_MODE_2DWAVINGCELL, &mode_2Dwavingcell, _data_FX_MODE_2DWAVINGCELL);
|
||||||
|
|
||||||
addEffect(FX_MODE_2DAKEMI, &mode_2DAkemi, _data_FX_MODE_2DAKEMI); // audio
|
addEffect(FX_MODE_2DAKEMI, &mode_2DAkemi, _data_FX_MODE_2DAKEMI); // audio
|
||||||
#endif // WLED_DISABLE_2D
|
#endif // WLED_DISABLE_2D
|
||||||
|
@ -257,6 +257,7 @@
|
|||||||
#define FX_MODE_2DDISTORTIONWAVES 124 //gap fill
|
#define FX_MODE_2DDISTORTIONWAVES 124 //gap fill
|
||||||
#define FX_MODE_2DSOAP 125 //gap fill
|
#define FX_MODE_2DSOAP 125 //gap fill
|
||||||
#define FX_MODE_2DOCTOPUS 126 //gap fill
|
#define FX_MODE_2DOCTOPUS 126 //gap fill
|
||||||
|
#define FX_MODE_2DWAVINGCELL 127 //gap fill
|
||||||
|
|
||||||
// WLED-SR effects (SR compatible IDs !!!)
|
// WLED-SR effects (SR compatible IDs !!!)
|
||||||
#define FX_MODE_PIXELS 128
|
#define FX_MODE_PIXELS 128
|
||||||
|
Loading…
Reference in New Issue
Block a user