Created
October 7, 2015 11:39
-
-
Save ghengeveld/63226a1b62f8f00f9277 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function embed(data, sizes) { | |
const formattedData = {}; | |
for (let uuid in sizes) { | |
if (sizes.hasOwnProperty(uuid) && data[uuid]) { | |
formattedData[uuid] = { | |
name: uuid, | |
w: sizes[uuid].width, | |
h: sizes[uuid].height, | |
vars: { | |
id: data[uuid], | |
autoScale: true, | |
forceTransform: true | |
} | |
}; | |
} | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment