FastLED 3.10.6
Loading...
Searching...
No Matches

◆ NoisePalette()

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

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

20 : Fx2d(xyMap), speed(0), scale(0), colorLoop(1), mFps(fps) {
21 // currentPalette = PartyColors_p;
22 FL_STATIC_ASSERT(sizeof(currentPalette) == sizeof(CRGBPalette16),
23 "Palette size mismatch");
24 currentPalette = PartyColors_p;
25 width = xyMap.getWidth();
26 height = xyMap.getHeight();
27
28 // Initialize our coordinates to some random values
29 mX = random16();
30 mY = random16();
31 mZ = random16();
32
34
35 // Allocate memory for the noise array using vector
36 noise.resize(width * height);
37}
Fx2d(const XYMap &xyMap)
Definition fx2d.h:19
u16 xyMap(u16 x, u16 y) const
Definition fx2d.h:20
CRGBPalette16 currentPalette
fl::vector_psram< u8 > noise
void setPalettePreset(int paletteIndex)
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(), colorLoop, currentPalette, FL_STATIC_ASSERT, height, mFps, mX, mY, mZ, noise, random16(), scale, setPalettePreset(), speed, width, and fl::Fx2d::xyMap().

+ Here is the call graph for this function: