esp32-sk6812/include/Animation/ImageScrollerAnimation.h

32 lines
533 B
C
Raw Normal View History

#pragma once
#include <random>
#include <vector>
#include "Animation.h"
#include "Bitmap.h"
class ImageScrollerAnimation : public Animation
{
public:
ImageScrollerAnimation(Fader *fader, Bitmap *image, uint32_t interval = 3);
void loop(uint64_t frame) override;
void stop(void) override
{
m_stopping = true;
}
void reset(void) override;
private:
Bitmap m_image;
int32_t m_startIdx;
uint32_t m_interval;
bool m_stopping;
};