Pattern for Manual Control of Pixels via WebSockets?

Hi @xd1936 ,

Unfortunately setVars doesn’t support nested arrays, so you can’t use it to set a 2 dimensional array (array of arrays) in order to structure it like you have in your pattern above.

Check out the work @zranger1 has done for an sACN proxy, which does something similar.

The idea is to pack the 3 RGB bytes into a single value and use setVars API to fill the array, then use a pattern to unpack the value back into RGB.

With some more context here

You could also use unpacked RGB values, where you create an array that is 3 * pixelCount where each pixel is 3 elements apart - similar to how a bitmap might be arranged in a byte array.

1 Like