7#define NUM_LEDS (WIDTH * HEIGHT)
10#define LED_TYPE WS2812B
11#define COLOR_ORDER GRB
28fl::u16
XY(fl::u16
x, fl::u16
y) {
56static const int MAXP = 256;
62 int I = (int)(tt / 50);
68 float noiseW = (n1 / 255.0f) *
WIDTH;
70 p.
a = tt * 1.25f + noiseW;
71 p.
f = (tt & 1) ? +1 : -1;
87 float r = constrain(s * 0.5f, 1.0f, 3.0f);
92 for (
int dy = -R; dy <= R; ++dy) {
93 for (
int dx = -R; dx <= R; ++dx) {
94 float d2 = dx * dx + dy * dy;
97 float fall = 1.0f - (d2 / (r2 + 0.0001f));
98 uint8_t v = (uint8_t)constrain(255.0f * fall, 0.0f, 255.0f);
119 for (
int i = 0; i <
MAXP; ++i)
140 for (
int i = 0; i <
MAXP; ++i) {
154 float tOver99 = (float)
t / 99.0f;
155 uint8_t n2 =
inoise8((uint16_t)(tOver99 * 4096), (uint16_t)(p.
g * 37));
156 float n2c = ((int)n2 - 128) / 255.0f;
160 float aa = p.
a * (float)p.
f;
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
CLEDController * controller
#define kMatrixSerpentineLayout
unsigned int xy(unsigned int x, unsigned int y)
static XYMap constructWithUserFunction(u16 width, u16 height, XYFunction xyFunction, u16 offset=0) FL_NOEXCEPT
static XYMap constructSerpentine(u16 width, u16 height, u16 offset=0) FL_NOEXCEPT
static XYMap constructRectangularGrid(u16 width, u16 height, u16 offset=0) FL_NOEXCEPT
fl::CLEDController CLEDController
void fadeToBlackBy(CRGB *leds, fl::u16 num_leds, fl::u8 fadeBy)
void blur2d(fl::span< CRGB > leds, u8 width, u8 height, fract8 blur_amount, const XYMap &xymap) FL_NOEXCEPT
void plotSoftDot(float fx, float fy, float s)
u16 xy_map_function(u16 x, u16 y, u16 width, u16 height)
void plotDot(int x, int y, uint8_t v)
void resetParticle(P &p, uint32_t tt)
fl::u8 inoise8(fl::u16 x, fl::u16 y, fl::u16 z)
float roundf(float value) FL_NOEXCEPT
float sinf(float value) FL_NOEXCEPT
float ceilf(float value) FL_NOEXCEPT
fl::u16 XY(fl::u16 x, fl::u16 y)
float cosf(float value) FL_NOEXCEPT
Base definition for an LED controller.