@@ -26,7 +26,7 @@ void threeSine() {
26
26
byte sinDistanceG = qmul8 (abs (y * (255 / kMatrixHeight ) - sin8 (sineOffset * 10 + x * 16 )), 2 );
27
27
byte sinDistanceB = qmul8 (abs (y * (255 / kMatrixHeight ) - sin8 (sineOffset * 11 + x * 16 )), 2 );
28
28
29
- leds [XY (x , y )] = CRGB (255 - sinDistanceR , 255 - sinDistanceG , 255 - sinDistanceB );
29
+ leds [XY (x , y , 0 , 0 )] = CRGB (255 - sinDistanceR , 255 - sinDistanceG , 255 - sinDistanceB );
30
30
}
31
31
}
32
32
@@ -70,7 +70,7 @@ void plasma() {
70
70
for (int x = 0 ; x < kMatrixWidth ; x ++ ) {
71
71
for (int y = 0 ; y < kMatrixHeight ; y ++ ) {
72
72
byte color = sin8 (sqrt (sq (((float )x - 7.5 ) * 10 + xOffset - 127 ) + sq (((float )y - 2 ) * 10 + yOffset - 127 )) + offset );
73
- leds [XY (x , y )] = CHSV (color , 255 , 255 );
73
+ leds [XY (x , y , 0 , 0 )] = CHSV (color , 255 , 255 );
74
74
}
75
75
}
76
76
@@ -100,7 +100,7 @@ void rider() {
100
100
brightness = 255 - brightness ;
101
101
CRGB riderColor = CHSV (cycleHue , 255 , brightness );
102
102
for (byte y = 0 ; y < kMatrixHeight ; y ++ ) {
103
- leds [XY (x , y )] = riderColor ;
103
+ leds [XY (x , y , 0 , 0 )] = riderColor ;
104
104
}
105
105
}
106
106
@@ -133,7 +133,7 @@ void colorFill() {
133
133
for (byte x = 0 ; x < kMatrixWidth ; x ++ ) {
134
134
byte y = currentRow ;
135
135
if (currentDirection == 2 ) y = kMatrixHeight - 1 - currentRow ;
136
- leds [XY (x , y )] = currentPalette [currentColor ];
136
+ leds [XY (x , y , 0 , 0 )] = currentPalette [currentColor ];
137
137
}
138
138
}
139
139
@@ -143,7 +143,7 @@ void colorFill() {
143
143
for (byte y = 0 ; y < kMatrixHeight ; y ++ ) {
144
144
byte x = currentRow ;
145
145
if (currentDirection == 3 ) x = kMatrixWidth - 1 - currentRow ;
146
- leds [XY (x , y )] = currentPalette [currentColor ];
146
+ leds [XY (x , y , 0 , 0 )] = currentPalette [currentColor ];
147
147
}
148
148
}
149
149
@@ -174,8 +174,8 @@ void sideRain() {
174
174
175
175
scrollArray (rainDir );
176
176
byte randPixel = random8 (kMatrixHeight );
177
- for (byte y = 0 ; y < kMatrixHeight ; y ++ ) leds [XY ((kMatrixWidth - 1 ) * rainDir , y )] = CRGB ::Black ;
178
- leds [XY ((kMatrixWidth - 1 )* rainDir , randPixel )] = CHSV (cycleHue , 255 , 255 );
177
+ for (byte y = 0 ; y < kMatrixHeight ; y ++ ) leds [XY ((kMatrixWidth - 1 ) * rainDir , y , 0 , 0 )] = CRGB ::Black ;
178
+ leds [XY ((kMatrixWidth - 1 )* rainDir , randPixel , 0 , 0 )] = CHSV (cycleHue , 255 , 255 );
179
179
180
180
}
181
181
@@ -194,7 +194,7 @@ void confetti() {
194
194
195
195
// scatter random colored pixels at several random coordinates
196
196
for (byte i = 0 ; i < 4 ; i ++ ) {
197
- leds [XY (random16 (kMatrixWidth ), random16 (kMatrixHeight ))] = ColorFromPalette (currentPalette , random16 (255 ), 255 ); //CHSV(random16(255), 255, 255);
197
+ leds [XY (random16 (kMatrixWidth ), random16 (kMatrixHeight ), 0 , 0 )] = ColorFromPalette (currentPalette , random16 (255 ), 255 ); //CHSV(random16(255), 255, 255);
198
198
random16_add_entropy (1 );
199
199
}
200
200
}
@@ -233,7 +233,7 @@ void myConfetti() {
233
233
234
234
// scatter random colored pixels at several random coordinates
235
235
for (byte i = 0 ; i < 4 ; i ++ ) {
236
- leds [XY (random16 (kMatrixWidth ), random16 (kMatrixHeight ))] = ColorFromPalette (MyColors_p , random16 (255 ), 255 ); //CHSV(random16(255), 255, 255);
236
+ leds [XY (random16 (kMatrixWidth ), random16 (kMatrixHeight ), 0 , 0 )] = ColorFromPalette (MyColors_p , random16 (255 ), 255 ); //CHSV(random16(255), 255, 255);
237
237
random16_add_entropy (1 );
238
238
}
239
239
@@ -263,7 +263,7 @@ void slantBars() {
263
263
264
264
for (byte x = 0 ; x < kMatrixWidth ; x ++ ) {
265
265
for (byte y = 0 ; y < kMatrixHeight ; y ++ ) {
266
- leds [XY (x , y )] = CHSV (cycleHue , 255 , quadwave8 (x * 32 + y * 32 + slantPos ));
266
+ leds [XY (x , y , 0 , 0 )] = CHSV (cycleHue , 255 , quadwave8 (x * 32 + y * 32 + slantPos ));
267
267
}
268
268
}
269
269
@@ -297,12 +297,12 @@ void swirly()
297
297
298
298
// The color of each point shifts over time, each at a different speed.
299
299
uint16_t ms = millis ();
300
- leds [XY ( i , j )] += CHSV ( ms / 11 , 200 , 255 );
301
- leds [XY ( j , i )] += CHSV ( ms / 13 , 200 , 255 );
302
- leds [XY (ni ,nj )] += CHSV ( ms / 17 , 200 , 255 );
303
- leds [XY (nj ,ni )] += CHSV ( ms / 29 , 200 , 255 );
304
- leds [XY ( i ,nj )] += CHSV ( ms / 37 , 200 , 255 );
305
- leds [XY (ni , j )] += CHSV ( ms / 41 , 200 , 255 );
300
+ leds [XY (i , j , 0 , 0 )] += CHSV ( ms / 11 , 200 , 255 );
301
+ leds [XY (j , i , 0 , 0 )] += CHSV ( ms / 13 , 200 , 255 );
302
+ leds [XY (ni ,nj , 0 , 0 )] += CHSV ( ms / 17 , 200 , 255 );
303
+ leds [XY (nj ,ni , 0 , 0 )] += CHSV ( ms / 29 , 200 , 255 );
304
+ leds [XY (i ,nj , 0 , 0 )] += CHSV ( ms / 37 , 200 , 255 );
305
+ leds [XY (ni , j , 0 , 0 )] += CHSV ( ms / 41 , 200 , 255 );
306
306
307
307
FastLED .show ();
308
308
}
0 commit comments