G.U.L.L.S/src/PlasmaMatrix.cpp

15 lines
358 B
C++

#include "PlasmaMatrix.h"
void PlasmaMatrix::execute() {
for(uint16_t x = 0; x < matrix->getWidth(); x++) {
for(uint16_t y = 0; y < matrix->getHeight(); y++) {
uint8_t color = (plasma[x][y] + paletteShift) % 256;
matrix->drawPixel(x, y, palette[color]);
}
}
paletteShift++;
matrix->requestShow();
}