30 lines
455 B
C++
30 lines
455 B
C++
#include <iostream>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include "Fader.h"
|
|
#include "Animation/RgbwPsychedelicAnimation.h"
|
|
|
|
int main(void)
|
|
{
|
|
Fader fader(8, 16);
|
|
|
|
Animation *animation = new RgbwPsychedelicAnimation(&fader);
|
|
|
|
for(uint64_t frame = 0; !animation->finished(); frame++) {
|
|
animation->loop(frame);
|
|
|
|
if(fader.something_changed()) {
|
|
fader.update();
|
|
}
|
|
|
|
if(frame == 60 * 90000) {
|
|
animation->stop();
|
|
}
|
|
|
|
usleep(16667);
|
|
};
|
|
|
|
delete animation;
|
|
}
|