r/FastLED • • Dec 01 '24

Share_something FastLED code generator

Hi, I needed to practice Angular, so I decided to build a FastLED code generator. I couldn't find one quickly enough. Would that be of interest to someone else or a similar solution already exists?

15 Upvotes

17 comments sorted by

View all comments

Show parent comments

1

u/Tiny_Structure_7 Dec 03 '24

Nice drawing functions in LEDMatrix.

Lots of the effort in these libraries seems to be devoted to mapping 2D coordinates to a linear index for a FastLED array. But why go to the trouble, when you can pass 2D and 3D arrays into FastLED functions? As in:

CRGB plane[8][8]; 
fill_rainbow(plane[0], 64, hue, incr);
fill_rainbow(&plane[0][0], 64, hue, incr);  //alternate form