128 {
129
131 const uint32_t now = millis();
132 uint32_t now_warped =
time_warp.update(now);
133
135 shape->setScale(
scale.value());
136
138 static float s_prev_alpha = 0.0f;
139
140
142
146 FASTLED_WARN(
"Transition triggered on " << shape->name());
148 s_prev_alpha = curr_alpha;
149 }
150
151 static uint32_t frame = 0;
152 frame++;
154 const CRGB purple =
CRGB(255, 0, 255);
157
158 float diff = curr_alpha - s_prev_alpha;
159 diff *= 1.0f;
160 float factor =
MAX(s_prev_alpha - diff, 0.f);
161
162 for (int i = 0; i < number_of_steps; ++i) {
163 float a =
165 if (a < .04) {
166
168 }
169 float diff_max_alpha =
maxAnimation.value() - curr_alpha;
170 if (diff_max_alpha < 0.94) {
171
174 }
175 uint8_t alpha =
178 subpixel.
scale(alpha);
179
180 raster.rasterize(subpixel);
181 }
182
183 s_prev_alpha = curr_alpha;
184
188 } else {
190 }
191
192 int first =
xyMap(1, 1);
194
198
200 }
201
202
203
204
206
207
210 for (int i = 0; i < 10; ++i) {
213 }
214
216}
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
void push_back(const T &value)
void scale(uint8_t scale)
UISlider numberOfSteps("Number of Steps", 32.0f, 1.0f, 100.0f, 1.0f)
UIButton trigger("Trigger")
XYPathPtr getShape(int which)
UISlider maxAnimation("Max Animation", 1.0f, 5.0f, 20.0f, 1.f)
XYMap xyMap_Dst(WIDTH/2, HEIGHT/2, false)
float getAnimationTime(uint32_t now)
XYRaster raster(WIDTH, HEIGHT)
TimeClampedTransition shapeProgress(TIME_ANIMATION)
UICheckbox useWaveFx("Use WaveFX", true)
CRGB leds_downscaled[NUM_LEDS/4]
UISlider whichShape("Which Shape", 0.0f, 0.0f, shapes.size() - 1, 1.0f)
InlinedVector< T, INLINED_SIZE > vector_inlined
void downscaleHalf(const CRGB *src, uint16_t srcWidth, uint16_t srcHeight, CRGB *dst)
FASTLED_FORCE_INLINE U map_range(T value, T in_min, T in_max, U out_min, U out_max)
Representation of an RGB pixel (Red, Green, Blue)