45 lines
1.0 KiB
C++
45 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include "prototypes.h"
|
|
#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;
|
|
double angle = 0;
|
|
double sx = 0;
|
|
double sy = 0;
|
|
double tx = 0;
|
|
double ty = 0;
|
|
double cx = 0;
|
|
double cy = 0;
|
|
double rcx = 0;
|
|
double rcy = 0;
|
|
double angle2 = 0;
|
|
double sx2 = 0;
|
|
double sy2 = 0;
|
|
double tx2 = 0;
|
|
double ty2 = 0;
|
|
double basecol = 0;
|
|
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"; }
|
|
};
|