Datasheet
The texture needs to go in a data folder inside your Processing sketch's folder. Save it as
ring.png inside this folder.
Now let's try out this texture! The sketch has a few new parts:
colorMode (http://adafru.it/cWc)() switches to the Hue, Saturation, Brightness color
space.
loadImage (http://adafru.it/cWd)() loads ring.png into a PImage variable.
drawRing() draws our texture with a particular hue, intensity, and location
Temporary code in draw() puts a single ring at the mouse cursor location
Try it out. Move the mouse around, and get a sense for how you can use textures to control
the shape and the behavior of the LEDs.
OPC opc;
PImage texture;
void setup()
{
size(500, 500, P3D);
colorMode(HSB, 100);
texture = loadImage("ring.png");
© Adafruit Industries https://learn.adafruit.com/led-art-with-fadecandy Page 51 of 60










