![]() I encountered a problem: I had to split the spritesheet in 2 parts to avoid HTML5 problems with memory overload (crash with Chrome and black screen with FF): the problem starts when copying the alpha channel (with the whole image and single frames too). I will improve the library later, but for now it does what I need. I have also created a method addBehaviorByPrefix, that allows to specify a simple string to identify all the frame names starting with that substring, similarly to the Starling way of creating animations from spritesheets. I used a different approach: I exported a generic XML file, with properties name, x, y, width, height, pivotX, pivotY, and created my XMLBitmapImporter, modifying, expanding and simplifying the whole spritesheet library (and I still have something more to add!): I can specify an image for the alpha channel, that is merged with the main spritesheet image BEFORE generating the single frames, avoiding to merge alpha for each frame. I will check if I can commit code to the spritesheet library for the frame label fix to ZoeImporter. I can answer more questions if necessary. It is a rather nice system at this point. ![]() #Texturepacker last frame movieGoing even further I wrote a movie clip implementation to use a spritesheet like it were a movieclip (mostly mapping calls and behaviors to match how movieclip works to the best I could). So i wrote a simple script to turn it into this: walk I also modded the class to not assume the use of Assets for the image and json file (instead taking in a bitmap and string).Īs for animations, the frames will get set up and named correctly, but TexturePacker doesn’t know or care about animations, so what I did was write a post processing script (using python) that cracks the file open and combines all like-named frames into an animation.įor example, your data will look like this by default: I will look into posting those changes for all to use : ) ![]() I did have to take that importer and fix one or two bugs that made the animation frame names not work. ![]() In spritesheet, use the ZoeImporter (which is EaselJS). In TexturePacker, set up an EaselJS project. I actually use TexturePacker and spritesheet together. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |