Effect sinematrix now comes in additional variants with some more color palettes.

This commit is contained in:
2019-10-12 23:27:49 +02:00
parent efa9a73cae
commit 6eeb7488b1
5 changed files with 42 additions and 5 deletions

View File

@ -4,6 +4,12 @@
#include "functions.h"
#include "Effect.h"
enum SinematrixColorScheme {
SINEMATRIX_COLOR_PASTEL_RAINBOW,
SINEMATRIX_COLOR_RAINBOW,
SINEMATRIX_COLOR_PURPLEFLY,
};
class Sinematrix3Effect : public Effect {
private:
double pangle = 0;
@ -25,12 +31,14 @@ private:
double fx = 1.0 / (LED_WIDTH / PI);
double fy = 1.0 / (LED_HEIGHT / PI);
Matrix rotate;
SinematrixColorScheme _color_scheme;
CRGB _get_color(int value);
public:
Sinematrix3Effect(SinematrixColorScheme s = SINEMATRIX_COLOR_PASTEL_RAINBOW): _color_scheme(s) {};
boolean supports_window = true;
boolean can_be_shown_with_clock();
boolean clock_as_mask();
void loop(uint16_t ms);
String get_name() override { return "sinematrix3"; }
};

View File

@ -6,3 +6,4 @@
extern const TProgmemRGBGradientPalette_byte palette_fire[] FL_PROGMEM;
extern const TProgmemRGBGradientPalette_byte palette_matrix[] FL_PROGMEM;
extern const TProgmemRGBGradientPalette_byte palette_purplefly_gp[] FL_PROGMEM;