Some days ago someone mentioned his desire to have a way to "flip" animations in anim8. So, for example, if you have a walking animation of someone moving to the left, you could generate the walking to the right animation from it with a single command, reusing the image.
I like this, because it would make code smaller and also save some memory.
What I need is to find a good API to do that.
So far I've come up with the following alternatives:
Code: Select all
local a = anim8.newAnimation(...)
local a1 = anim8.flipH(a) -- vertical: anim8.flipV(a)
local a2 = anim8.flip('h', a) -- vertical: anim8.flip('v', a)
local a3 = a:flip('h') -- or a:flip('v')
local a4 = a:flipH() -- or a:flipV()