b64-zipped-png => JSON containing dataURLs with custom metadata objects
Running example can be viewed/tested through runkit (formerly tonicdev):
When making dynamic graphic intensive apps or games using a JS web-IDE, I saw a need for a convenience tools for handling bitmaps (assuming that spritsheets are less convenient and unneeded performance-wise).
A URL source responding with a b64-encoded zip, containing png files (no folders)
A URL source responding with JSON object containing keys "ns" which string value is used as xm-namespace. "tags" [and "attributes"] contain property keys which are used for later tag recognition.
{
"image1_background": {
"ns": "testns",
"tags": {
"tagName1": {},
"tagName2": {}
},
"attributes": {
"attrName1": {},
"attrName2": {}
}
}
}
A JSON object with properties "results", which contains a property for each original png-image, and a "meta" property containing another list of images with each of their metadata.
{
"results":
{
"image1_background": "data:image/png;b64,iVBORw0KGgoAAAA...",
"image1_foreground": "data:image/png;b64,iVBORw0KGgoAAAA...",
"meta": {
"image1_background": {
"tagName1": "value1",
"tagName2": "value2"
},
"image1_foreground": {
"tagName1": "value3",
"tagName2": "value4"
}
}
}
- "Request 2.80.0" NPM-module, github release
- "JSON-endpoint 1.0.0" runkit-module
- "Data Helper Module 1.0.0" runkit-module, my repo
- "Custom XMP-reader Module 1.0.0" runkit-module, my fork, derived from xmp-reader
MIT Licence