@@ -8575,6 +8575,7 @@ static const char _data_FX_MODE_2DSOAP[] PROGMEM = "Soap@!,Smoothness;;!;2";
85758575// Octopus (https://editor.soulmatelights.com/gallery/671-octopus)
85768576// Stepko and Sutaburosu
85778577// adapted for WLED by @blazoncek
8578+ // RadialWave mode added by @softhack007, based on https://editor.soulmatelights.com/gallery/1090-radialwave
85788579uint16_t mode_2Doctopus () {
85798580 if (!strip.isMatrix ) return mode_static (); // not a 2D set-up
85808581
@@ -8632,21 +8633,27 @@ uint16_t mode_2Doctopus() {
86328633 else
86338634 SEGENV.step += SEGMENT.speed / 32 + 1 ; // 1-4 range
86348635
8636+ uint32_t octopusStep = SEGENV.step /2 ; // 1/2 for Octopus mode
8637+ uint32_t radialStep = 7 *SEGENV.step /6 ; // 7/6 = 1.16 for RadialWave mode
8638+
86358639 for (int x = xStart; x < xEnd; x++) {
86368640 for (int y = yStart; y < yEnd; y++) {
86378641 byte angle = rMap[XY (x,y)].angle ;
86388642 byte radius = rMap[XY (x,y)].radius ;
86398643 // CRGB c = CHSV(SEGENV.step / 2 - radius, 255, sin8(sin8((angle * 4 - radius) / 4 + SEGENV.step) + radius - SEGENV.step * 2 + angle * (SEGMENT.custom3/3+1)));
8640- uint16_t intensity = sin8 (sin8 ((angle * 4 - radius) / 4 + SEGENV.step /2 ) + radius - SEGENV.step + angle * (SEGMENT.custom3 /4 +1 ));
8644+ uint16_t intensity;
8645+ if (SEGMENT.check3 )
8646+ intensity = sin8 (radialStep + sin8 (radialStep - radius) + angle * (SEGMENT.custom3 /4 +1 )); // RadialWave
8647+ else
8648+ intensity = sin8 (sin8 ((angle * 4 - radius) / 4 + octopusStep) + radius - SEGENV.step + angle * (SEGMENT.custom3 /4 +1 )); // Octopus
86418649 intensity = map (intensity*intensity, 0 , 65535 , 0 , 255 ); // add a bit of non-linearity for cleaner display
86428650 CRGB c = ColorFromPalette (SEGPALETTE, SEGENV.step / 2 - radius, intensity);
86438651 SEGMENT.setPixelColorXY (x, y, c);
86448652 }
86458653 }
86468654 return FRAMETIME;
86478655}
8648- static const char _data_FX_MODE_2DOCTOPUS[] PROGMEM = " Octopus@!,,Offset X,Offset Y,Legs, SuperSync;;!;2;" ;
8649-
8656+ static const char _data_FX_MODE_2DOCTOPUS[] PROGMEM = " Octopus@!,,Offset X,Offset Y,Legs, SuperSync,,RadialWave ☾;;!;2;" ;
86508657
86518658// Waving Cell
86528659// @Stepko (https://editor.soulmatelights.com/gallery/1704-wavingcells)
0 commit comments