New version after 3 days


The bad news is the previous version only lasted 3 days. The good news is Origedit had a couple more good suggestions which have made this version better:

  • On narrow screens the overflow menu now spaces buttons a little apart so I'm not always scared of fat-fingering the wrong button.
  • You can now use your keyboard's swipe and autocomplete features with Carousel.
  • You can use your keyboard's paste feature with Carousel -- as long as it's short and a single line. It's still unreliable, though, and you're better off always using the 'paste' button in the app menu. (Which should now be easier to use without the spacing issue above.)

Today's example program is inspired by George Savva:

local X, Y = 200,300
local n = 2 -- scale
function popcnt(n)
  local result = 0
  while n ~= 0 do
    if bit.band(n, 1) == 1 then
      result = result+1
    end
    n = bit.rshift(n, 1)
  end
  return result
end
local S = bit.lshift(1, 30)
function sm(n)
  if n >= 0 then return n end
  return bit.bor(-n, S)
end
local g = love.graphics
for y = -64,64 do
  for x = -64,64 do
    local x2, y2 = sm(x), sm(y)
    local b = bit.band(x2, y2)
    local c = popcnt(b)
    g.setColor(1-c/8, 1-c/8, 2-c/8)
    g.rectangle('fill', X+x*n, Y-y*n, n,n)
  end
end

Files

carousel-bl.love 120 kB
16 days ago
carousel-bl-safe.love 120 kB
16 days ago

Get Lua Carousel

Leave a comment

Log in with itch.io to leave a comment.