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, 1, 1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8 };
|
|
|
|
|
|
|
|
// vertically oriented z map
|
2017-10-21 16:19:07 +02:00
|
|
|
const uint8_t coordsVZ[NUM_LEDS] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 13, 12, 11, 10, 9, 8, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 15, 14, 13, 12, 11, 10, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 17, 16, 15, 14, 13, 12, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 19, 18, 17, 16, 15, 14, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 21, 20, 19, 18, 17, 16, 15, 15, 16, 17, 18, 19, 20, 21, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 14, 15, 16, 17, 18, 19, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 12, 13, 14, 15, 16, 17, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 10, 11, 12, 13, 14, 15, 16, 15, 14, 13, 12, 11, 10, 9, 8, 22, 21, 20, 19, 18, 17, 16, 15, 14, 15, 16, 17, 18, 19, 20, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 9, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 7, 8, 9, 10, 11, 12, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 5, 6, 7, 8, 9, 10, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 10, 9, 8, 7, 6, 5, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 12, 11, 10, 9, 8, 7, 6, 7, 8, 9, 10, 11, 12, 13, 14 };
|
|
|
|
const uint8_t maxVZ = 22;
|
|
|
|
const uint8_t verticalHues = 255 / maxVZ;
|
|
|
|
|
|
|
|
void paletteFall() {
|
|
|
|
for (uint16_t i = 0; i < NUM_LEDS; i++) {
|
|
|
|
leds[i] = ColorFromPalette(palettes[currentPaletteIndex], beat8(speed) + (coordsVZ[i] * verticalHues));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void paletteRise() {
|
|
|
|
for (uint16_t i = 0; i < NUM_LEDS; i++) {
|
|
|
|
leds[i] = ColorFromPalette(palettes[currentPaletteIndex], beat8(speed) - (coordsVZ[i] * verticalHues));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void gradientPaletteFall() {
|
|
|
|
for (uint16_t i = 0; i < NUM_LEDS; i++) {
|
|
|
|
leds[i] = ColorFromPalette(gCurrentPalette, beat8(speed) + (coordsVZ[i] * verticalHues));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void gradientPaletteRise() {
|
|
|
|
for (uint16_t i = 0; i < NUM_LEDS; i++) {
|
|
|
|
leds[i] = ColorFromPalette(gCurrentPalette, beat8(speed) - (coordsVZ[i] * verticalHues));
|
|
|
|
}
|
|
|
|
}
|
2017-06-11 18:04:59 +02:00
|
|
|
|
|
|
|
void cubeXGradientPalette() {
|
|
|
|
uint8_t hues = 8;
|
|
|
|
|
|
|
|
for (uint16_t i = 0; i < NUM_LEDS; i++) {
|
|
|
|
uint8_t x = coordsX[i];
|
|
|
|
|
|
|
|
leds[i] = ColorFromPalette(gCurrentPalette, beat8(speed) - (x * hues));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void cubeYGradientPalette() {
|
|
|
|
uint8_t hues = 8;
|
|
|
|
|
|
|
|
for (uint16_t i = 0; i < NUM_LEDS; i++) {
|
|
|
|
uint8_t y = coordsY[i];
|
|
|
|
|
|
|
|
leds[i] = ColorFromPalette(gCurrentPalette, beat8(speed) - (y * hues));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void cubeZGradientPalette() {
|
|
|
|
uint8_t hues = 8;
|
|
|
|
|
|
|
|
for (uint16_t i = 0; i < NUM_LEDS; i++) {
|
|
|
|
uint8_t z = coordsZ[i];
|
|
|
|
|
|
|
|
leds[i] = ColorFromPalette(gCurrentPalette, beat8(speed) - (z * hues));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void cubeXYGradientPalette() {
|
|
|
|
uint8_t hues = 8;
|
|
|
|
|
|
|
|
for (uint16_t i = 0; i < NUM_LEDS; i++) {
|
|
|
|
uint8_t x = coordsX[i];
|
|
|
|
uint8_t y = coordsY[i];
|
|
|
|
|
|
|
|
leds[i] = ColorFromPalette(gCurrentPalette, beat8(speed) - ((x + y) * hues));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void cubeXZGradientPalette() {
|
|
|
|
uint8_t hues = 8;
|
|
|
|
|
|
|
|
for (uint16_t i = 0; i < NUM_LEDS; i++) {
|
|
|
|
uint8_t x = coordsX[i];
|
|
|
|
uint8_t z = coordsZ[i];
|
|
|
|
|
|
|
|
leds[i] = ColorFromPalette(gCurrentPalette, beat8(speed) - ((x + z) * hues));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void cubeYZGradientPalette() {
|
|
|
|
uint8_t hues = 8;
|
|
|
|
|
|
|
|
for (uint16_t i = 0; i < NUM_LEDS; i++) {
|
|
|
|
uint8_t y = coordsY[i];
|
|
|
|
uint8_t z = coordsZ[i];
|
|
|
|
|
|
|
|
leds[i] = ColorFromPalette(gCurrentPalette, beat8(speed) - ((y + z) * hues));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-21 16:19:07 +02:00
|
|
|
void cubeXPalette() {
|
|
|
|
uint8_t hues = 8;
|
|
|
|
|
|
|
|
for (uint16_t i = 0; i < NUM_LEDS; i++) {
|
|
|
|
uint8_t x = coordsX[i];
|
|
|
|
|
|
|
|
leds[i] = ColorFromPalette(palettes[currentPaletteIndex], beat8(speed) - (x * hues));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void cubeYPalette() {
|
|
|
|
uint8_t hues = 8;
|
|
|
|
|
|
|
|
for (uint16_t i = 0; i < NUM_LEDS; i++) {
|
|
|
|
uint8_t y = coordsY[i];
|
|
|
|
|
|
|
|
leds[i] = ColorFromPalette(palettes[currentPaletteIndex], beat8(speed) - (y * hues));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void cubeZPalette() {
|
|
|
|
uint8_t hues = 8;
|
|
|
|
|
|
|
|
for (uint16_t i = 0; i < NUM_LEDS; i++) {
|
|
|
|
uint8_t z = coordsZ[i];
|
|
|
|
|
|
|
|
leds[i] = ColorFromPalette(palettes[currentPaletteIndex], beat8(speed) - (z * hues));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void cubeXYPalette() {
|
2017-06-11 18:04:59 +02:00
|
|
|
uint8_t hues = 8;
|
|
|
|
|
|
|
|
for (uint16_t i = 0; i < NUM_LEDS; i++) {
|
|
|
|
uint8_t x = coordsX[i];
|
|
|
|
uint8_t y = coordsY[i];
|
2017-10-21 16:19:07 +02:00
|
|
|
|
|
|
|
leds[i] = ColorFromPalette(palettes[currentPaletteIndex], beat8(speed) - ((x + y) * hues));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void cubeXZPalette() {
|
|
|
|
uint8_t hues = 8;
|
|
|
|
|
|
|
|
for (uint16_t i = 0; i < NUM_LEDS; i++) {
|
|
|
|
uint8_t x = coordsX[i];
|
|
|
|
uint8_t z = coordsZ[i];
|
|
|
|
|
|
|
|
leds[i] = ColorFromPalette(palettes[currentPaletteIndex], beat8(speed) - ((x + z) * hues));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void cubeYZPalette() {
|
|
|
|
uint8_t hues = 8;
|
|
|
|
|
|
|
|
for (uint16_t i = 0; i < NUM_LEDS; i++) {
|
|
|
|
uint8_t y = coordsY[i];
|
2017-06-11 18:04:59 +02:00
|
|
|
uint8_t z = coordsZ[i];
|
|
|
|
|
2017-10-21 16:19:07 +02:00
|
|
|
leds[i] = ColorFromPalette(palettes[currentPaletteIndex], beat8(speed) - ((y + z) * hues));
|
2017-06-11 18:04:59 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|