131 {
132
136
137
141 wave_fx.wave_fx_low->setStencil(stencil);
142 wave_fx.wave_fx_high->setStencil(stencil);
143
145 shape->setScale(
scale.value());
146
148 static float s_prev_alpha = 0.0f;
149
150
152
156 FL_WARN(
"Transition triggered on " << shape->name());
158 s_prev_alpha = curr_alpha;
159 }
160
165
166 float diff = curr_alpha - s_prev_alpha;
167 diff *= 1.0f;
168 float factor =
fl::max(s_prev_alpha - diff, 0.f);
169
170 for (int i = 0; i < number_of_steps; ++i) {
171 float a =
173 if (a < .04) {
174
176 }
177 float diff_max_alpha =
maxAnimation.value() - curr_alpha;
178 if (diff_max_alpha < 0.94) {
179
182 }
186 subpixel.
scale(alpha);
187
188 raster.rasterize(subpixel);
189 }
190
191 s_prev_alpha = curr_alpha;
192
196 } else {
198 }
199
200 int first =
xyMap(1, 1);
202
206
208 }
209
210
211
212
214
215
218 for (int i = 0; i < 10; ++i) {
221 }
222
224}
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
fl::UISlider scale("Scale", 4,.1, 4,.1)
::fl::DrawContext DrawContext
void push_back(const T &value) FL_NOEXCEPT
fl::XYPathPtr getShape(int which)
fl::UICheckbox useWaveFx("Use WaveFX", true)
fl::XYMap xyMap_Dst(WIDTH/2, HEIGHT/2, false)
fl::XYRaster raster(WIDTH, HEIGHT)
fl::CRGB leds_downscaled[NUM_LEDS/4]
fl::UIButton trigger("Trigger")
fl::TimeClampedTransition shapeProgress(TIME_ANIMATION)
float getAnimationTime(uint32_t now)
fl::UISlider maxAnimation("Max Animation", 1.0f, 5.0f, 20.0f, 1.f)
fl::UICheckbox isotropicStencil("Isotropic stencil (rounder ripples)", false)
fl::UISlider whichShape("Which Shape", 0.0f, 0.0f, shapes.size() - 1, 1.0f)
fl::UISlider numberOfSteps("Number of Steps", 32.0f, 1.0f, 100.0f, 1.0f)
constexpr common_type_t< T, U > max(T a, U b) FL_NOEXCEPT
fl::u32 millis()
Universal millisecond timer - returns milliseconds since system startup.
FASTLED_FORCE_INLINE U map_range(T value, T in_min, T in_max, U out_min, U out_max) FL_NOEXCEPT
void downscaleHalf(const CRGB *src, fl::u16 srcWidth, fl::u16 srcHeight, CRGB *dst)
VectorN< T, INLINED_SIZE > vector_inlined
Representation of an 8-bit RGB pixel (Red, Green, Blue)