Compare commits

..

3 Commits

Author SHA1 Message Date
ArgonarioD 1a54a11e32 created example_new.json 2022-11-23 11:33:51 +08:00
ArgonarioD 03cd768f21 Merge remote-tracking branch 'origin/master' 2022-11-23 11:11:32 +08:00
ArgonarioD 3b486f5051 update json.json (old) 2022-11-23 11:11:24 +08:00
2 changed files with 316 additions and 13 deletions

289
1st_encode/example_new.json Normal file
View File

@ -0,0 +1,289 @@
{
"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": 6000
}
},
{
"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,
"angle": 6000
}
},
{
"type": "group",
"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": "iteration",
"data": {
"times": 5,
"operation": [
[
{
"type": "move",
"data": {
"dx": 5,
"dy": 6
}
},
{
"type": "rotate",
"data": {
"center": {
"dx": 0,
"dy": 0
},
"dθ": 6000
}
},
{
"type": "zoom",
"data": {
"zoom": 1.5
}
},
{
"type": "flip"
}
],
[
{
"type": "move",
"data": {
"dx": 5,
"dy": 6
}
},
{
"type": "rotate",
"data": {
"center": {
"dx": 0,
"dy": 0
},
"dθ": 6000
}
},
{
"type": "zoom",
"data": {
"zoom": 1.5
}
},
{
"type": "flip"
}
]
]
}
}
],
"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
}
]
}
}

View File

@ -72,19 +72,20 @@
{
"type": "arc",
"data": {
"circle": true,
"center": {
"x": 18,
"y": 21
},
"radius": 5,
"axis-length": {
"x": 4,
"y": 6
},
"angle": 6000
}
},
{
"type": "arc",
"data": {
"circle": false,
"center": {
"x": 18,
"y": 21
@ -132,15 +133,16 @@
{
"type": "round",
"data": {
"circle": true,
"radius": 5,
"axis-length": {
"x": 4,
"y": 6
},
"angle": 6000
}
},
{
"type": "round",
"data": {
"circle": false,
"axis-length": {
"x": 4,
"y": 6
@ -152,14 +154,26 @@
"type": "group",
"members": [
{
"of-map": true,
"id": 2
},
{
"of-map": false,
"id": 1
}
]
},
{
"type": "group",
"members": [
{
"id": 1
},
{
"id": 2
},
{
"id": 3
}
]
}
],
"map": [
@ -189,6 +203,10 @@
{
"type": "shadow",
"data": {}
},
{
"type": "iterate",
"id": 1
}
]
},
@ -202,10 +220,8 @@
"attached": []
}
],
"iterate": [
"iteration": [
{
"element-group": false,
"target": 2,
"times": 5,
"operations": [
{
@ -237,8 +253,6 @@
]
},
{
"element-group": true,
"target": 5,
"times": 5,
"children": [
[