FastLED 3.10.8
Loading...
Searching...
No Matches

◆ NoisePalette()

fl::NoisePalette::NoisePalette ( XYMap xyMap,
float fps = 60.f )

Definition at line 20 of file noisepalette.cpp.hpp.

21 : Fx2d(xyMap), speed(0), scale(0), colorLoop(1), mFps(fps) {
22 // currentPalette = PartyColors_p;
23 FL_STATIC_ASSERT(sizeof(currentPalette) == sizeof(CRGBPalette16),
24 "Palette size mismatch");
26 width = xyMap.getWidth();
27 height = xyMap.getHeight();
28
29 // Initialize our coordinates to some random values
30 mX = random16();
31 mY = random16();
32 mZ = random16();
33
35
36 // Allocate memory for the noise array using vector
37 noise.resize(width * height);
38}
u16 xyMap(u16 x, u16 y) const FL_NO_EXCEPT
Definition fx2d.h:21
Fx2d(const XYMap &xyMap) FL_NO_EXCEPT
Definition fx2d.h:20
CRGBPalette16 currentPalette
void setPalettePreset(int paletteIndex) FL_NO_EXCEPT
fl::vector_psram< u8 > noise
const TProgmemRGBPalette16 PartyColors_p
HSV color ramp: blue, purple, pink, red, orange, yellow (and back).
LIB8STATIC fl::u16 random16() FL_NO_EXCEPT
Generate a 16-bit random number.
Definition random8.h:63
#define FL_STATIC_ASSERT(...)

References fl::Fx2d::Fx2d(), currentPalette, fl::FL_NO_EXCEPT, FL_STATIC_ASSERT, height, mFps, mX, mY, mZ, noise, PartyColors_p, random16(), setPalettePreset(), width, and fl::Fx2d::xyMap().

+ Here is the call graph for this function: