Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grid('a-b,q-r') unexpected behavior #3

Closed
vrld opened this issue Jul 5, 2012 · 1 comment
Closed

grid('a-b,q-r') unexpected behavior #3

vrld opened this issue Jul 5, 2012 · 1 comment

Comments

@vrld
Copy link

vrld commented Jul 5, 2012

Getting frames from a grid shows (at least for me) unexpected behavior when using ranges for both the x- and y-coordinates.

Expected: Get frames in order (a,q), (a+1,q), ... (b,q), (b,q+1) ... (b,r).
Result: Frames in order (a,q), (a,q+1), ... (a,r), (a+1,q) ... (b,r).
Possible Fix: Swap anim8.lua:78 with anim8.lua:79.

Example:
Consider this animation from opengameart.org: https://i.imgur.com/xFHuX.jpg
Frames are laid out as following:

01 02 03 04
05 06 07 08
...
25 26 27 28
29 30 31 32

grid('1-4,1-8') returns the frames 01,05,...,29,02,06,...30,03, etc. In order to get the correct frame ordering you have to specify the frames as grid('1-4,1', '1-4,2', '1-4,3', ..., '1-4,8').

It would be super cool if we could specify the preference of x and y, but I have no idea how the API would look like. ;)

@kikito kikito closed this as completed in fe9dda9 Jul 5, 2012
@kikito
Copy link
Owner

kikito commented Jul 5, 2012

You're right, it's more intuitive to do the parsing "by rows". I don't think multi-dimensional animations are frequent enough to need a special case to differentiate this, so I'll just make it the default. If someone needs to parse "by columns", they will have to enter several parameters or rearrange their frames. Thanks for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants