ippa / jaws

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

More SpriteSheet flexibility #106

Open EliasZ opened 10 years ago

EliasZ commented 10 years ago

Looking at the docs and the code of the SpriteSheet class, there is limited flexibility regarding cutting up sprite sheets. They have to fixed sized frames in horizontal or vertical order. Working with (an example, Google'd for "sprite sheet") something like this: (http://www.pixeljoint.com/files/icons/full/sprite_sheet.png) is currently not possible (or am I missing something?).

Should I refactor my sprite sheet so Jaws can work with it properly or is there a more efficient way to do this?

ippa commented 10 years ago

Right now there's no easy way to use that kind of spritesheet in jaws and I currently don't have the need for it myself. That said, I would most likely accept a well-tested patch to add this functionality is someone wants to step up and do it.

So right now, you'll have to refactor your sprite sheets.