FastLED 3.9.15
Loading...
Searching...
No Matches
Wave2d.h File Reference
#include "fl/ui/ui.h"
#include "fl/fx/2d/wave.h"
#include <Arduino.h>
#include <FastLED.h>
+ Include dependency graph for Wave2d.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define HEIGHT   100
 
#define IS_SERPINTINE   true
 
#define NUM_LEDS   ((WIDTH) * (HEIGHT))
 
#define WIDTH   100
 

Functions

fl::UICheckbox autoTrigger ("Auto Trigger", true)
 
fl::UIButton button ("Trigger")
 
fl::UISlider dampening ("Dampening", 9.0f, 0.0f, 20.0f, 0.1f)
 
fl::UIDescription description ("Shows the use of the Wave2d effect. By default the wave is cyclical on the x-axis and waves will spill over to the other side.")
 
fl::UISlider extraFrames ("Extra Frames", 0.0f, 0.0f, 8.0f, 1.0f)
 
fl::SuperSample getSuperSample ()
 
fl::UICheckbox halfDuplex ("Half Duplex", true)
 
fl::UICheckbox isotropicStencil ("Isotropic stencil (rounder ripples)", false)
 
void loop ()
 
void setup ()
 
fl::UISlider slider ("Speed", 0.18f, 0.0f, 1.0f)
 
fl::UISlider superSample ("SuperSampleExponent", 1.f, 0.f, 3.f, 1.f)
 
fl::UITitle title ("Wave2D Demo")
 
fl::UIGroup triggerControls ("Trigger Controls", button, autoTrigger, extraFrames)
 
void triggerRipple (fl::WaveSimulation2D &waveSim)
 
fl::WaveSimulation2D waveSim (WIDTH, HEIGHT, fl::SuperSample::SUPER_SAMPLE_4X)
 
fl::UIGroup waveSimControls ("Wave Simulation", slider, dampening, halfDuplex, superSample, isotropicStencil, xCyclical)
 
fl::UICheckbox xCyclical ("X Is Cyclical", true)
 
fl::XYMap xyMap (WIDTH, HEIGHT, IS_SERPINTINE)
 

Variables

fl::CRGB leds [NUM_LEDS]