ippa / jaws

Jaws - HTML5 canvas javascript 2D Game Framework
https://jawsjs.ippa.se
GNU Lesser General Public License v3.0
363 stars 75 forks source link

Sprite sheets with multiple rows #54

Closed allansson closed 12 years ago

allansson commented 12 years ago

Hi!

I added a third option for the orientation-parameter of a SpriteSheet called "wrap". This will make the spritesheet cut frames horizontally and wrap to a new row when reaching the end of the image. Not sure if you think this fits in your master, but figured I might as well post a pull request about and let you have a look.

ippa commented 12 years ago

how is this different from orientation "right" ?

allansson commented 12 years ago

Ha, you're right! I didn't event notice. A friend of mine was complaining that it wasn't possible, so I just figured I would fix it for him. Never even occured to me to look if he was right or not.

Sorry to bother you. Move along, nothing to see here except a big dufus. :)

ippa commented 12 years ago

no worries :). From reading the code it's easy to miss I guess.. though it's clear in the docs :). If you want to make another patch int he future, try not to replace to whole file. If only the lines affected are replaced, it makes for a better patch to view and understand what was replaced. cheers!

allansson commented 12 years ago

Yeah. I think it was my editor that screwed something up with the file, hence it looking like I replaced the whole file. Might be line-endings or something like that.

Anyways, me and my friend are going to test your library for a little project. If we find anything, we'll let you know (or fix it ourselves).

Ciao!