These are chat archives for pixijs/pixi.js

2nd
Jul 2015
Chad Engler
@englercj
Jul 02 2015 02:03
The format is Texture Packer json hash format: https://www.codeandweb.com/texturepacker
The image that is loaded is specified in the json manifest file.
The way it loads the image and frames is by parsing the json and loading what is needed, it is done in the spritesheetParser: https://github.com/GoodBoyDigital/pixi.js/blob/master/src/loaders/spritesheetParser.js
The parser is a middleware for use with resource-loader, the underlying loader modules pixi uses: https://github.com/englercj/resource-loader
Paul
@Aralun
Jul 02 2015 09:04
Thanks, I'll look into it
Is this Texture Packer JSON hash documented anywhere? I'll try to find it.
Is it proprietary? If I want to use another software and make my own spritesheets/JSON, am I infringing their rights over their format?
Paul
@Aralun
Jul 02 2015 09:33
That resource loader thing is pretty impressive
Paul
@Aralun
Jul 02 2015 09:40
.. So if I want to externalize the loading of resources, I can just hook my data onto the parser. Interesting.
Thanks for the help!
Oh wait. You're the author of resource-loader! Thanks for that too, you deserve a cookie.
Chad Engler
@englercj
Jul 02 2015 13:47
I'm the author of pixi.js and resource loader
Mat and I have been writing pixi for 2 years now :)
Paul
@Aralun
Jul 02 2015 14:13
Well then now you're just scary
Mathias Latournerie
@JiDW
Jul 02 2015 14:55
He's like the real Genie from Aladdin
We have 3 wishes. We asked for PIXI, RessourceLoader
Still one left
Paul
@Aralun
Jul 02 2015 15:03
I have a question, about spritesheets and the resource-loader and stuff
The first way to generate a movie/animation is through the built-in magic, which works but is very format-specific
I'd like to try making my own animation system, from the loading to the animation itself. I think I should get the spritesheet, populate the frame cache, but then I'm a bit lost. Do such alternative API exist? What components, except from the loader and the middleware should I look into? MovieClip maybe?
Mathias Latournerie
@JiDW
Jul 02 2015 15:07
Indeed
Paul
@Aralun
Jul 02 2015 15:08
Let's eat some code then
Mathias Latournerie
@JiDW
Jul 02 2015 15:08
I think it would be very easy to imitate the json and use the build-in aprser
But the json format used by PIXI from texturePacker is very simple
Gitter inverted my two last messages
Paul
@Aralun
Jul 02 2015 15:09
Yes, but the lack of documentation (and prior experience dealing with spritesheets) made me scratch my head a while before I got it.
Mathias Latournerie
@JiDW
Jul 02 2015 15:11
It's your call. If you are looking for the easiest way and to ensure compatibility with future updates, I think it's the way to go
Paul
@Aralun
Jul 02 2015 15:12
Indeed. This is why I think I'm going to try coding an abstraction and using my own format, I guess.