build for esp32 mask project
This commit is contained in:
@ -55,13 +55,16 @@ public:
|
||||
// Grab the physical pixel we'll start with
|
||||
PhysicalCoordinates startPos = map->virtualToPhysicalCoords({m_pos, 0});
|
||||
PhysicalCoordinates endPos = map->virtualToPhysicalCoords({m_pos + width, 0});
|
||||
int scaledWidth = std::abs(endPos.x - startPos.x);
|
||||
uint8_t scaledWidth = std::abs(endPos.x - startPos.x);
|
||||
|
||||
//Log.notice("blob w=%d x=%d", scaledWidth, startPos.x);
|
||||
for(uint8_t i = 0;i < scaledWidth; i++) {
|
||||
// Blobs desaturate towards their tail
|
||||
//Log.notice("blob i=%d w=%d x=%d", i, scaledWidth, startPos.x);
|
||||
CHSV blobColor(m_hue, m_saturation, quadwave8((i / (double)scaledWidth) * m_brightness));
|
||||
uint8_t scalePct = map8(i, 0, scaledWidth);
|
||||
uint8_t val = lerp8by8(0, m_brightness, scalePct);
|
||||
//CHSV blobColor(m_hue, m_saturation, quadwave8((i / (double)scaledWidth) * m_brightness));
|
||||
CHSV blobColor(m_hue, m_saturation, quadwave8(val));
|
||||
|
||||
PhysicalCoordinates pos{startPos.x + (i*m_fadeDir), 0};
|
||||
|
||||
|
Reference in New Issue
Block a user