gluckgames / pixi-packer

Fast and flexible texture packer for PIXI.js
MIT License
40 stars 6 forks source link

Custom output filenames #43

Closed kulabros closed 7 years ago

kulabros commented 7 years ago

Hi there, I'm using pixi-packer as a new user, I realy like i a lot, thank you very much for this great and powerfull tool! Once I'm trying to implement building process in my large project, I need to have under controll exact names of output image and json files. Of course, I can do some post-scripting, and change/deliver these to target paths manually/automaticly. But, at first, I'd like to know/ask, if I can easily edit/change name of the ouput files. I need something like: sprite01-EN.png, sprite02-EN.png, assets-EN.json, and also, different output path for images / json would be very nice.. I can do some patches, but I'd like to know more deep, how this can be done. Thanks for any inputs.M.

marekventur commented 7 years ago

Hi!

Sadly changing filenames of the output images is not that simple since spritesheets are referenced by the manifest by name. Feel free to hack around thought, the bits that determine filenames are https://github.com/Gamevy/pixi-packer/blob/master/lib/spritesheet.js#L91 and https://github.com/Gamevy/pixi-packer/blob/master/lib/loading_manifest.js#L76

kulabros commented 7 years ago

Ok, no problem, thanks for referencing in code, btw, packer works great, great tool! :) Thank you