Hi,
I think you need to provide allColors and allRects as column vectors:
"Instead of filling one rectangle, you can also specify a list of multiple rectangles to be filled - this is much faster when you need to draw many rectangles per frame. To fill n rectangles, provide “rect” as a 4 rows by n columns matrix, each column specifying one rectangle, e.g., rect(1,5)=left border of 5th rectange, rect(2,5)=top border of 5th rectangle, rect(3,5)=right border of 5th rectangle, rect(4,5)=bottom border of 5th rectangle. If the rectangles should have different colors, then provide “color” as a 3 or 4 row by n column matrix, the i’th column specifiying the color of the i’th rectangle."
Not sure if you are doing it this way, yet I guess you have sorted this out by now.
Best,
Mikel