From 3d5f71a88e1266877d45520eab3b289de37ed5da Mon Sep 17 00:00:00 2001 From: ArgonarioD Date: Thu, 4 Aug 2022 16:37:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=86=E8=BF=AD=E4=BB=A3?= =?UTF-8?q?=E4=B8=AD=E5=A4=9A=E5=AD=A9=E5=AD=90=E6=83=85=E5=86=B5=E7=9A=84?= =?UTF-8?q?=E4=B8=80=E7=BA=A7=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1st_encode/byte.md | 39 ++++++++++----------- 1st_encode/json.json | 80 ++++++++++++++++++++++++++++++-------------- 2 files changed, 75 insertions(+), 44 deletions(-) diff --git a/1st_encode/byte.md b/1st_encode/byte.md index 32e729d..684cd3a 100644 --- a/1st_encode/byte.md +++ b/1st_encode/byte.md @@ -1,25 +1,26 @@ # 整体结构总览 > 注:所有x、y坐标都为有符号整数,实际处理时需要除以1000变回小数 -| 说明 | 位数 | 备注 | -| ------------------------------ | ---- | ---------------------------------------------- | -| 图像宽度 width | 16 | 实际位数+11记为W | -| 图像高度 height | 16 | 实际位数+11记为H | -| elements列表长度 | 16 | 标记了该图像上的所有元素原型 | -| > 元素种类 type | 4 | | -| > 元素信息 data | | 详见[elements](#elements) | -| map列表长度 | 16 | 标记了该图像上所有元素原型在图像中的信息 | -| > 元素id element | 16 | | -| > 坐标 position | 0 | | -| >> x坐标 | W | | -| >> y坐标 | H | | -| > 所处层数 level | 16 | 从0x00FF开始递增,置入底层操作直接移到当前最下 | -| > 附加信息 attached 列表长度 | 8 | 详见[map-attached](#map-attached) | -| iterate列表长度 | 16 | 标记该图像中应用迭代函数系统的信息 | -| > 是否为元素组 element-group | 1 | 若为1,则在elements中寻找组的原始map信息 | -| > 原始元素mapId target | 16 | | -| > 迭代次数 times | 32 | | -| > 迭代操作 operations 列表长度 | 8 | 详见[iterate-operations](#iterate-operations) | +| 说明 | 位数 | 备注 | +| -------------------------------- | ---- | ---------------------------------------------- | +| 图像宽度 width | 16 | 实际位数+11记为W | +| 图像高度 height | 16 | 实际位数+11记为H | +| elements列表长度 | 16 | 标记了该图像上的所有元素原型 | +| > 元素种类 type | 4 | | +| > 元素信息 data | | 详见[elements](#elements) | +| map列表长度 | 16 | 标记了该图像上所有元素原型在图像中的信息 | +| > 元素id element | 16 | | +| > 坐标 position | 0 | | +| >> x坐标 | W | | +| >> y坐标 | H | | +| > 所处层数 level | 16 | 从0x00FF开始递增,置入底层操作直接移到当前最下 | +| > 附加信息 attached 列表长度 | 8 | 详见[map-attached](#map-attached) | +| iterate列表长度 | 16 | 标记该图像中应用迭代函数系统的信息 | +| > 是否为元素组 element-group | 1 | 若为1,则在elements中寻找组的原始map信息 | +| > 原始元素mapId target | 16 | | +| > 迭代次数 times | 32 | | +| > 单次迭代孩子 children 列表长度 | 8 | 其中每个operations列表代表一个孩子 | +| >> 迭代操作 operations 列表长度 | 8 | 详见[iterate-operations](#iterate-operations) | # elements ## type diff --git a/1st_encode/json.json b/1st_encode/json.json index 51ab978..b3cebe7 100644 --- a/1st_encode/json.json +++ b/1st_encode/json.json @@ -240,33 +240,63 @@ "element-group": true, "target": 5, "times": 5, - "operations": [ - { - "type": "move", - "data": { - "dx": 5, - "dy": 6 + "children": [ + [ + { + "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": "rotate", - "data": { - "center": { - "dx": 0, - "dy": 0 - }, - "dθ": 6000 + ], + [ + { + "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": "zoom", - "data": { - "zoom": 1.5 - } - }, - { - "type": "flip" - } + ] ] } ]