FastLED 3.9.15
Loading...
Searching...
No Matches
fx_layer.h
Go to the documentation of this file.
1#pragma once
2
3#include "fl/stl/stdint.h"
4#include "fl/stl/shared_ptr.h" // For FASTLED_SHARED_PTR macros
5#include "fl/stl/shared_ptr.h" // For shared_ptr
6
7// Forward declarations to avoid including heavy headers
8namespace fl {
9class Frame;
10class Fx;
11class AudioBatch;
12
14class FxLayer {
15 public:
16 void setFx(fl::shared_ptr<Fx> newFx);
17
18 void draw(fl::u32 now, float speed = 1.0f, const AudioBatch *audio = nullptr);
19
20 void pause(fl::u32 now);
21
22 void release();
23
25
27
28 private:
31 fl::u32 mLastNow = 0;
32 bool running = false;
33};
34
35} // namespace fl
uint16_t speed
Definition Noise.ino:66
Definition fx.h:18
fl::shared_ptr< Fx > getFx()
void pause(fl::u32 now)
void setFx(fl::shared_ptr< Fx > newFx)
fl::shared_ptr< Fx > fx
Definition fx_layer.h:30
fl::shared_ptr< Frame > frame
Definition fx_layer.h:29
void draw(fl::u32 now, float speed=1.0f, const AudioBatch *audio=nullptr)
fl::u32 mLastNow
Definition fx_layer.h:31
fl::span< CRGB > getSurface()
bool running
Definition fx_layer.h:32
Base definition for an LED controller.
Definition crgb.hpp:179
#define FASTLED_SHARED_PTR(type)
Definition shared_ptr.h:535