How would I use a texture packer #192
Replies: 4 comments 4 replies
-
Definitely interested in supporting natively 👍 |
Beta Was this translation helpful? Give feedback.
-
Is this what you're looking for? https://kaboom2000.slmjkdbtl.repl.co/demo#spriteatlas (origin sprite atlas image here) |
Beta Was this translation helpful? Give feedback.
-
Wonder if this is what you're looking for: https://github.com/slmjkdbtl/kaboom_texpack/blob/master/index.html |
Beta Was this translation helpful? Give feedback.
-
I see the next problem that is happening now, and that is defining the animation frames. If I understand, right now the anims can only be a range of frames (i.e. from: 0, to: 5). Plus I have to know the full size of the set of frames that make up all the anims for the one character, because I need to provide the width/height of them all and then a sliceX or sliceY. It would be nice if I could just pass an array of sprite names to make up the anim frames. Does that make sense? I'm thinking something like this (just as an idea)...
|
Beta Was this translation helpful? Give feedback.
-
In the past, I've used free-tex-packer-core to pack my sprites into one image. I could then reference the frames by name (as stored in the json file that goes with the sprite sheet) and in the case of Phaser it could
this.load.multiatlas()
the sprite sheet and pretty easily define all the animations withthis.anims.generateFrameNames()
. (See example tutorial here) As I'm developing in Kaboom, I'm missing the ability to have a sprite sheet that can be built dynamically.Does anyone know a tool that could help with this when the engine doesn't have it built in, and then of course secondly, whatcha think about support for "text atlas" or "sprite sheet" in Kaboom???? 😄
Beta Was this translation helpful? Give feedback.
All reactions