info = { type = "image", title = "Mining", category = "btc", author = "BRRRO", version = "1.0", license = "MIT", desc = "Rows of racks with blinking LEDs", api = 33, } local LAYER = { { 10.8, 16, 18 }, { 24, 38, 22 } } local PITCH = 13 function render() local W, H, FPS = gfx.W, gfx.H, gfx.FPS local rect, px = gfx.rect, gfx.px for y = 0, H - 1 do local f = y / H rect(0, y, W, 1, 60 + 36 * f, 66 + 38 * f, 84 + 40 * f) end local blink = frame // (FPS * 0.15) for l = 1, 2 do local L = LAYER[l] local off = math.floor(frame * L[1] / FPS) % PITCH local ry, rh = L[2], L[3] for i = 0, 5 do local x = i * PITCH - off if x >= 1 then rect(x, ry, 1, rh, 72, 80, 98) end local bx, bw = x + 1, 9 if bx < 1 then bx, bw = 1, x + 9 end if bw > 0 then rect(bx, ry, bw, rh, 108, 116, 136) end if x + 10 >= 1 then rect(x + 10, ry, 1, rh, 72, 80, 98) end for u = 0, 4 do local lx = x + 2 + u * 2 if lx > 0 and lx < W then if (i * 7 + u * 13 + blink) % 3 < 2 then px(lx, ry + 2, 70, 236, 140) else px(lx, ry + 2, 34, 92, 72) end end end end end end