I am Andreas Loew - creator of TexturePacker and PhysicsEditor.
We define the export formats for our tools depending on the needs of the framework developers - in most cases we simply adapt to formats that are already available.
Most of TexturePacker's data formats are template based - you can adjust it to whatever you need.
We also have 3 generic data formats: XML, JSON Hash and JSON Array.
I currently don't remember which framework we created the format for but it was it 2011-02-14 - TexturePacker's 2.1.5 release that contained the format.
In case of Phaser we've also created clones of the JSON format "Phaser (JSONArray)" which export the same data format but do restrict the features that are available in TexturePacker. Phaser does not support polygon packing and pivot points - features that are recently available in the generic exporters.
We also work close with the framework developers to add new features - which might also extend the format. E.g. TexturePacker 4.1.0 next update will contain a pivot point editor - so the format has to be extended. We'll also make sure that the new extension is used by as many frameworks as possible.
This is how a basic entry looks like:
frame: The position of the sprite's data in the texture (in pixels)
rotated: If the sprite is rotated in the texture. Clockwise by default. Might differ for some frameworks which rely on counter clockwise rotated sprites.
trimmed: True if transparency was removed from the original sprite.
spriteSourceSize: The non-transparent part of the sprite that is used in the frame. Additional space around the sprite is transparent. This value unfortunately contains redundancy because the w and h value is identical with the frame's w and h.
sourceSize: The original size of the sprite including the transparency.
Recent additions to the format:
The pivot or anchor point of the sprite - relative to the sprite's size - 0.5/0.5 is the sprite's center. Might also be outside of the sprite. This value is optional.
polygon mesh data
"vertices": [ [178,118], [215,168], [200,237], [159,256], [97,256], [64,218], [56,167], [86,124], [124,111] ],
"verticesUV": [ [799,54], [836,104], [821,173], [780,192], [718,192], [685,154], [677,103], [707,60], [745,47] ],
"triangles": [ [5,7,8], [5,6,7], [3,5,8], [3,4,5], [1,2,3], [1,3,8], [0,1,8] ]
Contains polygon mesh data of the sprite, split in triangles. vertices contains the vertices in sprite coordinates, verticesUV the vertices in texture coordinates and triangles index triplets which build the triangles.
Polygon meshes will most likely not be adopted by HTML5 game engines too fast - at least not as long as they have a fallback on Canvas sprites (which are rectangular) but will work well with WebGL renderers.
... so much for the data format.
But I agree: We should document the format so that people can rely on it.