Ya it scales, no LED setting @ 2048 pixels is about 30FPS, with 512 set its much higher 60 70 something like that and as more panels are added it slows down. Seems pretty linear from some observations.
The patterm CODE is the EXAMPLE CODE the time and animation sample that comes with every unit.
The map is this but did not seem to be dependent on the map.
//sainsmart reverse xy loop.
function (pixelCount) {
//enable zigzag if every other LED row travels in reverse
//if they are all straight across, disable it
zigzag = true
//roate a point (x, y), along a center (cx, cy), by an angle in degrees
function rotate(cx, cy, x, y, angle) {
var radians = (Math.PI / 180) * angle,
cos = Math.cos(radians),
sin = Math.sin(radians),
nx = (cos * (x - cx)) + (sin * (y - cy)) + cx,
ny = (cos * (y - cy)) - (sin * (x - cx)) + cy;
return [nx, ny];
}
//create a set of coordinates for a matrix panel
// sized (w, h), rotated by an angle, and offset by (sx, sy)
function panel(w, h, sx, sy, angle) {
var x, y2, y, p, map = []
for (x = 0; x < w; x++) {
for (y = 0; y < h; y++) {
//for zigzag, flip direction every other row
if (zigzag && x % 2 == 1)
y2 = h - 1 - y
else
y2 = y
p = rotate((w-1)/2, (h-1)/2, x, y2, angle);
p[0] += sx
p[1] += sy
map.push(p)
}
}
return map;
}
//assemble one or more panels
var map = [];
map = map.concat(panel(16, 16, 0, 0, 0))
map = map.concat(panel(16, 16, 0, 16, 0))
map = map.concat(panel(16, 16, 16, 0, 0))
map = map.concat(panel(16, 16, 16, 16, 0))
map = map.concat(panel(16, 16, 32, 0, 0))
map = map.concat(panel(16, 16, 32, 16, 0))
map = map.concat(panel(16, 16, 48, 0, 0))
map = map.concat(panel(16, 16, 48, 16, 0))
return map
}