3D GEQ - make front brightness a control
This commit is contained in:
@@ -8441,6 +8441,7 @@ uint16_t mode_3DGEQ(void) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8_t frontBrightness = SEGMENT.custom1;
|
||||||
for (int i=0; i<16; i++) {
|
for (int i=0; i<16; i++) {
|
||||||
|
|
||||||
uint16_t colorIndex = map(cols/16*i, 0, cols-1, 0, 255);
|
uint16_t colorIndex = map(cols/16*i, 0, cols-1, 0, 255);
|
||||||
@@ -8450,35 +8451,41 @@ uint16_t mode_3DGEQ(void) {
|
|||||||
|
|
||||||
if (heights[i] > 1) {
|
if (heights[i] > 1) {
|
||||||
|
|
||||||
// Full bright fronts, fills all front face.
|
if(frontBrightness > 250) {
|
||||||
// for (int x=linex; x<linex+(cols/16);x++) {
|
// Full bright fronts, fills all front face.
|
||||||
// SEGMENT.drawLine(x,rows-1,x,rows-heights[i]-1,ledColor); // front fill
|
for (int x=linex; x<linex+(cols/16);x++) {
|
||||||
// }
|
SEGMENT.drawLine(x,rows-1,x,rows-heights[i]-1,ledColor); // front fill
|
||||||
|
}
|
||||||
// Faded fronts, assumes border added later.
|
}
|
||||||
// for (int x=linex+1; x<linex+(cols/16)-1;x++) {
|
else if(frontBrightness >= 50) {
|
||||||
// SEGMENT.drawLine(x,rows-2,x,rows-heights[i]-2,color_fade(ledColor,64,true)); // front fill
|
// Faded fronts, assumes border added later.
|
||||||
// }
|
for (int x=linex+1; x<linex+(cols/16)-1;x++) {
|
||||||
|
SEGMENT.drawLine(x,rows-2,x,rows-heights[i]-2,color_fade(ledColor,64,true)); // front fill
|
||||||
// "Negative Space" - draw pure black fronts
|
}
|
||||||
for (int x=linex; x<linex+(cols/16);x++) {
|
}
|
||||||
SEGMENT.drawLine(x,rows-1,x,rows-heights[i]-1,BLACK); // front fill
|
else {
|
||||||
|
// "Negative Space" - draw pure black fronts
|
||||||
|
for (int x=linex; x<linex+(cols/16);x++) {
|
||||||
|
SEGMENT.drawLine(x,rows-1,x,rows-heights[i]-1,BLACK); // front fill
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(frontBrightness >= 50) { // TODO: other values too? not sure exactly when we want the border
|
||||||
// Border
|
// Border
|
||||||
// SEGMENT.drawLine(linex, rows-1,linex,rows-heights[i]-1,ledColor); // left side line
|
SEGMENT.drawLine(linex, rows-1,linex,rows-heights[i]-1,ledColor); // left side line
|
||||||
// SEGMENT.drawLine(linex+(cols/16)-1,rows-1,linex+(cols/16)-1,rows-heights[i]-1,ledColor); // right side line
|
SEGMENT.drawLine(linex+(cols/16)-1,rows-1,linex+(cols/16)-1,rows-heights[i]-1,ledColor); // right side line
|
||||||
// SEGMENT.drawLine(linex, rows-heights[i]-2,linex+(cols/16)-1,rows-heights[i]-2,ledColor); // top line
|
SEGMENT.drawLine(linex, rows-heights[i]-2,linex+(cols/16)-1,rows-heights[i]-2,ledColor); // top line
|
||||||
// SEGMENT.drawLine(linex, rows-1,linex+(cols/16)-1,rows-1,ledColor); // bottom line
|
SEGMENT.drawLine(linex, rows-1,linex+(cols/16)-1,rows-1,ledColor); // bottom line
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return FRAMETIME;
|
return FRAMETIME;
|
||||||
|
|
||||||
}
|
}
|
||||||
static const char _data_FX_MODE_3DGEQ[] PROGMEM = "3D GEQ"; // TODO set Audio, 2D and controls etc
|
static const char _data_FX_MODE_3DGEQ[] PROGMEM = "3D GEQ☾@!,,Fill Front,,;;!;2"; // TODO set Audio, 2D and controls etc
|
||||||
|
|
||||||
|
|
||||||
#endif // WLED_DISABLE_2D
|
#endif // WLED_DISABLE_2D
|
||||||
|
|||||||
Reference in New Issue
Block a user