Skip to content

Instantly share code, notes, and snippets.

@dacap
Last active April 18, 2016 13:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dacap/f63939401b7b3ba1d98b380d9457a865 to your computer and use it in GitHub Desktop.
Save dacap/f63939401b7b3ba1d98b380d9457a865 to your computer and use it in GitHub Desktop.
var fs = require('fs');
var jay = JSON.parse(fs.readFileSync('jay.json', 'utf8'));
var robin = JSON.parse(fs.readFileSync('robin.json', 'utf8'));
var smile = JSON.parse(fs.readFileSync('smile.json', 'utf8'));
var data = { "jay": { "tags": jay.meta.frameTags,
"layers": jay.meta.layers },
"robin": { "tags": robin.meta.frameTags,
"layers": robin.meta.layers },
"smile": { "tags": smile.meta.frameTags,
"layers": smile.meta.layers } };
fs.writeFileSync('output-data.json', JSON.stringify(data));
{
"smile": {
"layers": [
{
"blendMode": "normal",
"opacity": 255,
"name": "Background"
}
],
"tags": [
{
"direction": "forward",
"to": 1,
"from": 0,
"name": "Smile"
},
{
"direction": "forward",
"to": 5,
"from": 2,
"name": "Run"
}
]
},
"robin": {
"layers": [
{
"blendMode": "normal",
"opacity": 255,
"name": "Background"
}
],
"tags": [
{
"direction": "forward",
"to": 1,
"from": 0,
"name": "Smile"
},
{
"direction": "forward",
"to": 5,
"from": 2,
"name": "Run"
}
]
},
"jay": {
"layers": [
{
"blendMode": "normal",
"opacity": 255,
"name": "Background"
}
],
"tags": [
{
"direction": "forward",
"to": 1,
"from": 0,
"name": "Smile"
},
{
"direction": "forward",
"to": 5,
"from": 2,
"name": "Run"
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment