46#define SERPENTINE true
112uint8_t
getPaletteIndex(uint32_t millis32,
int width,
int max_width,
int height,
int max_height,
121 float xf = (float)width / (
float)max_width;
122 uint8_t
x = (uint8_t)(xf * 255);
125 uint32_t cosx = cos8(
x);
126 uint32_t sinx = sin8(
x);
138 uint16_t
z = millis32 /
invSpeedZ.as<uint16_t>();
144 uint16_t noise16 =
inoise16(cosx << 8, sinx << 8,
y << 8, 0);
147 uint8_t noise_val = noise16 >> 8;
152 int8_t subtraction_factor = abs8(height - (max_height - 1)) * 255 /
157 return qsub8(noise_val, subtraction_factor);
165 return electricGreenFirePal;
167 return electricBlueFirePal;
192 for (
int width = 0; width <
WIDTH; width++) {
193 for (
int height = 0; height <
HEIGHT; height++) {
196 uint8_t palette_index =
fl::UIDescription description("Demo of the Animatrix effects. @author of fx is StefanPetrick")
fl::UITitle title("Animartrix")
fl::UISlider brightness("Brightness", BRIGHTNESS, 0, 255)
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
fl::UISlider scaleX("ScaleX",.3, 0.1, 3,.01)
fl::UISlider invSpeedZ("Inverse SpeedZ", 20, 1, 100, 1)
UINumberField palette("Palette", 0, 0, 2)
uint8_t getPaletteIndex(uint32_t millis32, int width, int max_width, int height, int max_height, uint32_t y_speed)
fl::UISlider scaleXY("Scale", 8, 1, 100, 1)
fl::TimeWarp timeScale(0, 1.0f)
fl::CRGBPalette16 getPalette()
fl::UISlider speedY("SpeedY", 1.3, 1, 6,.1)
fl::UISlider scale("Scale", 4,.1, 4,.1)
void setDiameter(float diameter) FL_NOEXCEPT
#define DEFINE_GRADIENT_PALETTE(X)
CRGB ColorFromPalette(const CRGBPalette16 &pal, fl::u8 index, fl::u8 brightness, TBlendType blendType)
fl::u16 inoise16(fl::u32 x, fl::u32 y, fl::u32 z, fl::u32 t)
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
fl::u32 millis()
Universal millisecond timer - returns milliseconds since system startup.
Representation of an 8-bit RGB pixel (Red, Green, Blue)
Aggregator header for the fl/ui/ family of per-element UI types.