Hi @60hz -- I was just looking into what it would take to add a [gl.multiimage] (analog of Gem's [pix_multiimage]).
I'm thinking...
-
Add
local images
and fill it as an array ofofImage()
objects. -
Add a method
show i
to choose the image to display -- here I'm not completely sure. Should this simply setimage$0 = images[i]
? Or do we need to copy the image data? -
It seems pretty easy to replicate [pix_multiimage]'s approach of requiring images to be named e.g.
/path/to/images_*.jpg
where*
is replaced by 0, 1, 2... n (formatted without leading zeros). I never really liked that, though (spoiled by SuperCollider'spathMatch
globbing function). I saw online that Lua doesn't have globbing built in... so I'm stuck with the sequential numbered approach? Or do you know if there's a way to reference Lua libraries from Ofelia?
Thanks!
hjh