info = { type = "image", title = "Stage", category = "patterns", author = "BRRRO", version = "1.0", license = "MIT", desc = "Stage with a gold and a blue spotlight", api = 33, } local FLOOR = 50 local POOL = { 15, 14, 12, 9, 5 } local function cone(cx, r, g, b) for y = 3, FLOOR - 1 do local half = 1 + (14 * (y - 3)) // (FLOOR - 3) gfx.blend_rect(cx - half, y, 2 * half + 1, 1, r, g, b, 0.30) end for k = 1, #POOL do gfx.blend_rect(cx - POOL[k], FLOOR + k, 2 * POOL[k] + 1, 1, r, g, b, 0.45) end gfx.rect(cx - 2, 0, 5, 3, 40, 40, 48) gfx.rect(cx - 1, 3, 3, 1, r, g, b) end function render() local W, H = gfx.W, gfx.H gfx.clear(12, 8, 26) gfx.rect(0, FLOOR, W, H - FLOOR, 34, 24, 50) gfx.rect(0, FLOOR, W, 1, 70, 54, 100) local s = frame / gfx.FPS * 0.45 cone(15 + math.floor(3 * math.sin(s) + 0.5), 255, 190, 60) cone(49 + math.floor(3 * math.sin(s + 2.1) + 0.5), 80, 150, 255) end