diff --git a/1st_encode/example_new.json b/1st_encode/example_new.json index 79495b3..c8aeef1 100644 --- a/1st_encode/example_new.json +++ b/1st_encode/example_new.json @@ -3,125 +3,14 @@ "width": 1080, "elements": [ { - "type": "path", + "name": "ababa", + "type": "svg-file", "data": { - "operations": [ - { - "type": "line", - "data": { - "target": { - "x": 15, - "y": 20 - } - } - }, - { - "type": "cubic", - "data": { - "target": { - "x": 18, - "y": 21 - }, - "control": { - "start": { - "x": 17, - "y": 22 - }, - "end": { - "x": 20, - "y": 23 - } - } - } - }, - { - "type": "cubic-smooth", - "data": { - "target": { - "x": 18, - "y": 21 - }, - "control": { - "x": 18, - "y": 21 - } - } - }, - { - "type": "quadratic", - "data": { - "target": { - "x": 18, - "y": 21 - }, - "control": { - "x": 18, - "y": 21 - } - } - }, - { - "type": "quadratic-smooth", - "data": { - "target": { - "x": 18, - "y": 21 - } - } - }, - { - "type": "arc", - "data": { - "center": { - "x": 18, - "y": 21 - }, - "x-axis": 40, - "y-axis": 50, - "angle": 60 - } - }, - { - "type": "zeal" - } - ] - } - }, - { - "type": "polygon", - "data": { - "points": [ - { - "x": 10, - "y": 20 - }, - { - "x": 10, - "y": 20 - }, - { - "x": 10, - "y": 20 - }, - { - "x": 10, - "y": 20 - }, - { - "x": 10, - "y": 20 - } - ] - } - }, - { - "type": "round", - "data": { - "x-axis": 30, - "y-axis": 40 + "include": "./svg/ababa.svg" } }, { + "name": "ababa-group", "type": "group", "data": { "reference-layer": "0.0" diff --git a/1st_encode/example_new_backup.json b/1st_encode/example_new_backup.json new file mode 100644 index 0000000..79495b3 --- /dev/null +++ b/1st_encode/example_new_backup.json @@ -0,0 +1,266 @@ +{ + "height": 1080, + "width": 1080, + "elements": [ + { + "type": "path", + "data": { + "operations": [ + { + "type": "line", + "data": { + "target": { + "x": 15, + "y": 20 + } + } + }, + { + "type": "cubic", + "data": { + "target": { + "x": 18, + "y": 21 + }, + "control": { + "start": { + "x": 17, + "y": 22 + }, + "end": { + "x": 20, + "y": 23 + } + } + } + }, + { + "type": "cubic-smooth", + "data": { + "target": { + "x": 18, + "y": 21 + }, + "control": { + "x": 18, + "y": 21 + } + } + }, + { + "type": "quadratic", + "data": { + "target": { + "x": 18, + "y": 21 + }, + "control": { + "x": 18, + "y": 21 + } + } + }, + { + "type": "quadratic-smooth", + "data": { + "target": { + "x": 18, + "y": 21 + } + } + }, + { + "type": "arc", + "data": { + "center": { + "x": 18, + "y": 21 + }, + "x-axis": 40, + "y-axis": 50, + "angle": 60 + } + }, + { + "type": "zeal" + } + ] + } + }, + { + "type": "polygon", + "data": { + "points": [ + { + "x": 10, + "y": 20 + }, + { + "x": 10, + "y": 20 + }, + { + "x": 10, + "y": 20 + }, + { + "x": 10, + "y": 20 + }, + { + "x": 10, + "y": 20 + } + ] + } + }, + { + "type": "round", + "data": { + "x-axis": 30, + "y-axis": 40 + } + }, + { + "type": "group", + "data": { + "reference-layer": "0.0" + } + } + ], + "root-layer": { + "name": "root", + "offset": { + "x": 0, + "y": 0 + }, + "transformation": [ + 0,0,0, + 0,0,0, + 0,0,0 + ], + "effects": [], + "is-folder": true, + "referenced-by": null, + "children": [ + { + "name": "GroupFolderExample", + "offset": { + "x": 5, + "y": 10 + }, + "transformation": [ + 0,0,0, + 0,0,0, + 0,0,0 + ], + "effects": [ + { + "type": "iterate", + "data": { + "time": 5, + "operations": [ + { + "type": "move", + "data": { + "offset": { + "x": 5, + "y": 6 + } + } + }, + { + "type": "rotate", + "data": { + "center-offset": { + "x": 0, + "y": 0 + }, + "angle": 60 + } + }, + { + "type": "zoom", + "data": { + "zoom": 1.5 + } + }, + { + "type": "flip", + "data": { + "k": 1.2, + "b": 3 + } + } + ] + } + } + ], + "is-folder": true, + "referenced-by": 3, + "children": [ + { + "name": "GroupedLayer1", + "offset": { + "x": 10, + "y": 20 + }, + "transformation": [ + 5,0,0, + 0,6,0, + 0,0,0 + ], + "effects": [], + "is-folder": false, + "element": 0 + }, + { + "name": "GroupedLayer2", + "offset": { + "x": 15, + "y": 25 + }, + "transformation": [ + 5,0,0, + 0,6,0, + 0,0,0 + ], + "effects": [], + "is-folder": false, + "element": 1 + } + ] + }, + { + "name": "ReferencingGroupLayer", + "offset": { + "x": 10, + "y": 20 + }, + "transformation": [ + 5,0,0, + 0,6,0, + 0,0,0 + ], + "effects": [], + "is-folder": false, + "element": 3 + }, + { + "name": "Layer1", + "offset": { + "x": 10, + "y": 20 + }, + "transformation": [ + 5,0,0, + 0,6,0, + 0,0,0 + ], + "effects": [], + "is-folder": false, + "element": 3 + } + ] + } +} \ No newline at end of file