@taptap/maker 0.0.41-beta.2 → 0.0.41-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/maker.js +23235 -16663
- package/docs/MAKER_CONSOLE.md +29 -9
- package/docs/MAKER_MCP_CONNECTION_TROUBLESHOOTING.md +5 -5
- package/package.json +1 -1
- package/skills/lua-ui-to-json/SKILL.md +1 -0
- package/skills/maker-ui-bbox-workflow/SKILL.md +1 -0
- package/skills/maker-ui-workflow/SKILL.md +1 -0
- package/skills/maker-ui-workflow/references/layout.md +65 -0
- package/skills/maker-ui-workflow/references/responsive.md +2 -0
- package/skills/taptap-maker-local/SKILL.md +2 -1
- package/skills/taptap-maker-local/references/diagnostics.md +1 -1
- package/skills/taptap-maker-local/references/ui-motion.md +73 -0
package/docs/MAKER_CONSOLE.md
CHANGED
|
@@ -46,18 +46,33 @@ Lua LSP/Python 状态在后台异步检查,同一时刻只执行一次;首
|
|
|
46
46
|
“其他”是独立的控制台页面,支持 ?page=other 直达,默认打开“UI 动效”,左侧依次为“项目检查”和“UI 动效”。
|
|
47
47
|
内部切换不修改顶部主导航;离开“其他”后整个工具区隐藏。
|
|
48
48
|
UI 动效随 Maker 包分发,由同源的 /ui-motion 页面承载,无需选择项目或运行额外演示服务器。
|
|
49
|
-
“NanoVG
|
|
50
|
-
|
|
49
|
+
“NanoVG 绘制”排在第一位并默认展示,包含五个完整界面与三个转场的大卡片;默认呈现随包示例,不依赖本机参考目录。
|
|
50
|
+
动效必须使用原版 LuaTween,不使用 JS 移植或自写缓动。网页通过 Fengari 执行 LuaTween 与共享 Lua 配方,
|
|
51
|
+
Canvas2D / NanoVG 只绘图;内置简化候选、完整界面、图片 UI 和 43 项工坊均采用这一约束。
|
|
52
|
+
默认使用随包的 Lua、UI.json、时间线与资源索引;PNG、字体按示例资源机制下载校验并缓存,
|
|
53
|
+
无需本机参考项目。`/ui-motion/runtime-reference` 返回实际执行的 Lua、接入说明和资源地址。
|
|
54
|
+
页签上方用两行介绍 LuaTween;“源码”和“使用说明”在当前页只读弹窗展示随包的 LuaTween.lua
|
|
55
|
+
与 README,不跳转外部仓库,下载的离线示例也可直接阅读。用户体验后点击
|
|
56
|
+
“选用 · 交给 AI → 复制接入指令”,指令记录当前效果、皮肤或片段,而非最初打开的卡片。
|
|
57
|
+
AI 默认只将所选动效接入已有 UI:复用项目已有的兼容 LuaTween;未安装时放入
|
|
58
|
+
`scripts/LuaTween.lua`,沿用项目统一更新入口与组件生命周期,不要求用户手动安装。
|
|
59
|
+
`taptap-maker-local` 的 `references/ui-motion.md` 与参考包内 `docs/LuaTween-integration.md`
|
|
60
|
+
共用接入指引。参考包同时包含库 README、API、版本和 SHA-256;下载后可交给另一台电脑的
|
|
61
|
+
AI,官方素材使用稳定 CDN 地址。仅明确要求整套示例时才导入相应图片与布局。
|
|
62
|
+
原生入口保留独立生命周期,只有调用者自己的控制器会被销毁;逐帧定位不执行业务回调。
|
|
63
|
+
参考项目另有 `ui-motion-vector-sample/index.html` 时,仍可指定本机素材覆盖;运行代码由当前包提供。
|
|
51
64
|
同目录的 `catalog.json` 可列出完整界面与转场卡片,替代内置矢量卡片;未提供清单时仍展示单张样板。
|
|
52
|
-
|
|
65
|
+
随包参考包含可编辑 UI.json、独立 PNG 与原生入口,AI 接入指令指向当前包实际执行的源码。
|
|
53
66
|
本机示例的体验弹窗随窗口高度布局,嵌入页通过 `embed=1` 调整画面与关键帧区域;轨道较多时在时间轴内滚动。
|
|
54
67
|
转场卡片的演示播完后保留所选转场,支持重播、逐帧定位和进入目标界面;游戏内按钮仍按正常流程切页。
|
|
55
|
-
`/ui-motion/vector-sample`
|
|
56
|
-
|
|
57
|
-
|
|
68
|
+
`/ui-motion/vector-sample` 默认呈现随包示例;本机覆盖只保留素材和布局,使用当前包 LuaTween 播放。网页与游戏 NanoVG 入口分别标明。
|
|
69
|
+
“NanoVG 绘制”底部提供“更多动效”,在控制台内打开随包工坊。
|
|
70
|
+
该工坊按六类提供 36 组动效与 7 种按钮反馈,支持七套按视觉关键词命名的 UI 风格、组件点击、重播和 33 项顺播。
|
|
58
71
|
界面仅展示普通 UI 组件和必要操作符号,不包含角色、怪物、游戏专属标记或特色道具插图。
|
|
59
72
|
左侧展示按钮、弹窗、列表、物品、对话与奖励,右侧目录可滚动;保持横屏画面,不显示底部时间轴。
|
|
60
73
|
风格通过左右小三角循环切换,底部当前名称可展开七套界面列表,支持上下滚动与键盘选择。
|
|
74
|
+
首次打开及切换皮肤显示 loading、字体准备和真实图片计数;加载期间禁用选用,
|
|
75
|
+
失败提供手动重试,连续 60 秒无进展提示超时,不自动重试或修改 LuaTween 动效配方。
|
|
61
76
|
组件皮肤使用 NanoVG 与按风格分类的独立 PNG;按各自设计稿保留布局与材质,
|
|
62
77
|
面板、控件、列表行和物品卡独立绘制,坐标及层级见参考项目的 assets/ui/motion-lab-v2/。
|
|
63
78
|
阶段时序保留在 catalog.json 供 AI 接入参考。
|
|
@@ -66,7 +81,7 @@ UI 动效随 Maker 包分发,由同源的 /ui-motion 页面承载,无需选
|
|
|
66
81
|
径向菜单、弹性回弹与磁铁拖拽标注为自动演示;游戏业务与真实拖拽由接入方实现。
|
|
67
82
|
`/ui-motion/motion-lab` 仅只读提供固定文件,沿用本机示例的路径、大小与 CSP 限制;
|
|
68
83
|
工坊文件上限为 48 MiB,其余本机示例仍为 24 MiB。
|
|
69
|
-
|
|
84
|
+
未指定本机参考目录时使用随包工坊;显式指定的目录缺少该文件时不展示工坊入口。AI 指令以当前包实际源码为准。
|
|
70
85
|
“图片 UI”展示五个游戏项目界面(主菜单、角色选择、剧情对话、绒幕星仪剧场、章节剧场)与三个转场,
|
|
71
86
|
使用已审核原创设计经 Maker 画布生成/分离的独立 PNG、可编辑 UI.json、原生 Lua 及其导出的时间线。
|
|
72
87
|
当前通过 UI 组件的 `backgroundImage` 绘制图片;图集帧与序列帧动画可使用引擎 `UI.Sprite`。
|
|
@@ -75,10 +90,15 @@ UI 动效随 Maker 包分发,由同源的 /ui-motion 页面承载,无需选
|
|
|
75
90
|
该目录应含 ui-motion-native/catalog.json;控制台仅只读提供清单中列出的预览文件、PNG、UI.json、Lua 和字体。
|
|
76
91
|
清单上限 1 MiB,文件和图片列表各最多 1024 项;参考包文本累计上限 32 MiB,
|
|
77
92
|
单文件读取上限 24 MiB。超限清单不接入;参考包正文及文件超限时在读取正文前返回 413。
|
|
78
|
-
|
|
93
|
+
已审核的官方素材经授权登记示例资源库,图片无损压缩并校验 CDN;字体保留许可证。
|
|
94
|
+
本机覆盖仍只读,不自动上传用户自定义素材。未配置目录时展示官方图片 UI,不用矢量候选替换。
|
|
79
95
|
动效库不加载或提供视频、整屏原片抽帧、原帧人物序列;素材路由仅允许实际使用的独立图片和字体,
|
|
80
96
|
旧 web-demo / web-demo-clockwork 研究目录不再接入;未列入新清单的文件返回 404,媒体播放由 CSP 禁止。
|
|
81
|
-
卡片预览取同一套 PNG 与 UI.json
|
|
97
|
+
卡片预览取同一套 PNG 与 UI.json 的静态渲染;人物动作使用独立生成的姿态图,不包含原片人物序列。
|
|
98
|
+
图片 UI 卡片显示排队、加载及失败状态,进入页签后仅将靠近可见区域的卡片加入预览队列;失败可单独重试,
|
|
99
|
+
不阻塞后续卡片。演示弹窗与独立页显示真实素材计数及字体准备状态,就绪后开放播放;
|
|
100
|
+
加载失败或连续 60 秒无进展时提供手动重试,不自动重复下载,素材仍复用现有 CDN 缓存。
|
|
101
|
+
本机参考覆盖也使用当前包配套的播放器 HTML、CSS 和 JS,避免旧页面缺少加载控件;素材与游戏 UI 布局仍取本机文件。
|
|
82
102
|
GET /ui-motion/original-reference?id=S01 返回适配后的源码、独立素材路径和读取地址;
|
|
83
103
|
参考包包含精确文件清单、来源画布、UI 路径、脚本、素材 SHA-256 与未实现边界。接入层不改写游戏文件。
|
|
84
104
|
选用后的 AI 指令要求只使用清单中的独立素材,分别实现 UI、交互与动效。
|
|
@@ -160,7 +160,7 @@ macOS/Linux:
|
|
|
160
160
|
|
|
161
161
|
```text
|
|
162
162
|
command: npx
|
|
163
|
-
args: ["-y", "-p", "@taptap/maker@0.0.41-beta.
|
|
163
|
+
args: ["-y", "-p", "@taptap/maker@0.0.41-beta.4", "taptap-maker"]
|
|
164
164
|
```
|
|
165
165
|
|
|
166
166
|
上面的 macOS/Linux npx 形式只是显式兼容模式;默认同样是绝对 Node + 版本化 self runtime。
|
|
@@ -265,7 +265,7 @@ stderr、尝试的编码和解码错误,不能把解码异常直接当成 Make
|
|
|
265
265
|
例如,配置使用 Windows 绝对 Node/npm CLI 时,按相同顺序复现:
|
|
266
266
|
|
|
267
267
|
```bat
|
|
268
|
-
"<绝对 node.exe>" "<绝对 npm-cli.js>" exec --yes --package @taptap/maker@0.0.41-beta.
|
|
268
|
+
"<绝对 node.exe>" "<绝对 npm-cli.js>" exec --yes --package @taptap/maker@0.0.41-beta.4 -- taptap-maker
|
|
269
269
|
```
|
|
270
270
|
|
|
271
271
|
然后用该 CLI 执行 `mcp verify --json`;不要只用 `help` 代替 MCP 协议握手。
|
|
@@ -273,7 +273,7 @@ stderr、尝试的编码和解码错误,不能把解码异常直接当成 Make
|
|
|
273
273
|
配置使用 macOS/Linux 标准 argv 时:
|
|
274
274
|
|
|
275
275
|
```bash
|
|
276
|
-
npx -y -p @taptap/maker@0.0.41-beta.
|
|
276
|
+
npx -y -p @taptap/maker@0.0.41-beta.4 taptap-maker help
|
|
277
277
|
```
|
|
278
278
|
|
|
279
279
|
如果终端成功而客户端失败,应继续排查客户端读取的配置、信任状态、PATH、cwd 和子进程启动方式,
|
|
@@ -296,7 +296,7 @@ npx -y -p @taptap/maker@0.0.41-beta.2 taptap-maker help
|
|
|
296
296
|
作为可选恢复方式,并先备份实际生效的配置:
|
|
297
297
|
|
|
298
298
|
```bash
|
|
299
|
-
npx -y -p @taptap/maker@0.0.41-beta.
|
|
299
|
+
npx -y -p @taptap/maker@0.0.41-beta.4 taptap-maker mcp install --launcher self
|
|
300
300
|
```
|
|
301
301
|
|
|
302
302
|
Windows 如无法从 PATH 运行上述恢复命令,应使用当前可用 npm 的绝对路径启动这一次 CLI;安装器
|
|
@@ -328,7 +328,7 @@ Windows 如无法从 PATH 运行上述恢复命令,应使用当前可用 npm
|
|
|
328
328
|
指纹打扰。用户明确同意后无需第二次确认,AI 将已脱敏的当前会话错误 JSON 通过 stdin 传入:
|
|
329
329
|
|
|
330
330
|
```text
|
|
331
|
-
npx -y --package @taptap/maker@0.0.41-beta.
|
|
331
|
+
npx -y --package @taptap/maker@0.0.41-beta.4 taptap-maker mcp report --ide <client> --target-dir <project> --context-stdin --consent --json
|
|
332
332
|
```
|
|
333
333
|
|
|
334
334
|
优先原样复用当前客户端 Maker MCP 配置中的 command 和有序 args,再追加上述 `mcp report`
|
package/package.json
CHANGED
|
@@ -17,6 +17,7 @@ description: 将 UrhoX Lua UI 提取为 .ui.json,检查已有导出文件,
|
|
|
17
17
|
- [检查与排错](references/diagnostics.md):已有 JSON 检查、预览异常时读取。
|
|
18
18
|
- [NanoVG 提取与回放](references/nanovg.md):原始 nvg 自绘、曲线、渐变图层的提取、编辑与引擎接入。
|
|
19
19
|
- [多分辨率适配](../maker-ui-workflow/references/responsive.md):保留或修复全屏、贴边、安全区和比例布局时读取;引擎 Skill 的指导缺口在 Maker 侧补齐。
|
|
20
|
+
- [排版参数](../maker-ui-workflow/references/layout.md):调整贴边、居中、拉伸或列表伸缩时读取;只使用其中列出的字段。
|
|
20
21
|
- [检查命令](scripts/check-ui.cjs) 与 [共享规则](scripts/ui-json-check.cjs):两个脚本随包提供。
|
|
21
22
|
|
|
22
23
|
检查脚本要求 Node.js 22,无需安装依赖。直接运行提供的脚本,不另写一份近似检查器。
|
|
@@ -41,6 +41,7 @@ AI 负责最后的看图复核与定向修复,直到达到第 4 节的完成
|
|
|
41
41
|
## 3. 复核修复(把结果修到完整)
|
|
42
42
|
|
|
43
43
|
多分辨率适配按同包 [适配指引](../maker-ui-workflow/references/responsive.md) 执行。
|
|
44
|
+
贴边、居中、拉伸和列表伸缩只按[排版参数](../maker-ui-workflow/references/layout.md)调整,不新造对齐字段。
|
|
44
45
|
自动组装使用全屏、安全区和初拟锚点;先看 assembly-map.json 的 adaptation,按用途修正分组,
|
|
45
46
|
不能把自动推断当成已验证布局,也不能把非全屏组件强制全屏。
|
|
46
47
|
|
|
@@ -98,6 +98,7 @@ references/workflow.md 的「图集合批」。已有结果保留,不为了合
|
|
|
98
98
|
布局字段、坐标依据、冗余资源和双重对位契约见 [workflow.md](references/workflow.md)。
|
|
99
99
|
生成完整 UI 或修复分辨率适配时,读取[多分辨率适配](references/responsive.md),确定逻辑单位、
|
|
100
100
|
页面/组件及分组约束;新全屏组装显式提供 adaptation,不能只交付固定坐标截图式布局。
|
|
101
|
+
调整贴边、居中、拉伸或列表伸缩时,读取[排版参数](references/layout.md)。只改该文件列出的字段,不替用户决定构图,也不新造对齐模式。
|
|
101
102
|
|
|
102
103
|
1. 官方合批模板与历史分类模板都先准备原稿与去文字稿,再分别识别去文字稿 UI 与原稿文字。
|
|
103
104
|
两条流程都保存同格式 Bbox JSON,按设置使用识图来源。
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# UI 排版参数
|
|
2
|
+
|
|
3
|
+
不替用户决定构图。只按设计稿已经表现出来的关系调整下面这些引擎已有字段。
|
|
4
|
+
没有屏幕断点,也不要新造对齐模式字段。
|
|
5
|
+
|
|
6
|
+
## 先判断
|
|
7
|
+
|
|
8
|
+
- 边距都相对父节点,不是相对屏幕。要贴屏幕,父节点必须铺满屏幕或安全区。
|
|
9
|
+
- 固定贴某一边用 `position: "absolute"`,只写要对齐的边,再写宽高。对边不要写,否则会把控件拉变形。
|
|
10
|
+
- 会随内容增减、需要排队的区域用普通流式布局,不要一律改成绝对定位。
|
|
11
|
+
- `textAlign` 只决定字在控件内部靠左、居中还是靠右,不能把控件钉到屏幕边上。
|
|
12
|
+
|
|
13
|
+
## 可以调的参数
|
|
14
|
+
|
|
15
|
+
| 参数 | 作用 |
|
|
16
|
+
| --------------------------------------------------------- | ------------------------------------------------------------------------ |
|
|
17
|
+
| `position: "absolute"` | 脱离自动排队,按 `left` / `top` / `right` / `bottom` 贴父容器 |
|
|
18
|
+
| `position: "relative"` 或不写 | 参加父容器排队 |
|
|
19
|
+
| `left` / `top` / `right` / `bottom` | 到父容器对应边的距离。数字是逻辑像素,也可以写 `"10%"`。只写需要钉住的边 |
|
|
20
|
+
| `width` / `height` | 固定尺寸。和两条对边同时写会拉伸,固定按钮不要这样写 |
|
|
21
|
+
| `minWidth` / `maxWidth` / `minHeight` / `maxHeight` | 允许伸缩时的下限和上限。`maxWidth` 不会把内部固定坐标一起缩小 |
|
|
22
|
+
| `aspectRatio` | 用一边推另一边。不要和宽高同时锁死 |
|
|
23
|
+
| `margin` 及 `marginLeft` / `Right` / `Top` / `Bottom` | 节点外侧空隙。居中时配合 `left: "50%"` 使用负的 `marginLeft` |
|
|
24
|
+
| `padding` 及四边、`paddingHorizontal` / `paddingVertical` | 容器内侧留白,子节点从留白里面开始排 |
|
|
25
|
+
| `flexDirection` | 子节点排列方向:`column` 竖排,`row` 横排 |
|
|
26
|
+
| `justifyContent` | 沿排列方向怎么分布:靠起点、居中、靠终点、或均匀分开 |
|
|
27
|
+
| `alignItems` | 垂直于排列方向怎么对齐:靠起点、居中、靠终点、拉满 |
|
|
28
|
+
| `alignSelf` | 单个子节点覆盖父容器的交叉对齐。不能用来做“固定在右上角” |
|
|
29
|
+
| `flexGrow` | 占据父容器剩余空间。列表容器可用,列表单项不要用来填满 |
|
|
30
|
+
| `flexShrink` | 空间不够时能否缩小。不写时预览按不缩小处理 |
|
|
31
|
+
| `flexWrap` | `wrap` 时放不下就换行 |
|
|
32
|
+
| `gap` / `rowGap` / `columnGap` | 子节点之间的间距 |
|
|
33
|
+
| `overflow` | `visible` 允许超出容器,`hidden` / `scroll` 裁切;滚动需要 `ScrollView` |
|
|
34
|
+
|
|
35
|
+
安全区不是普通对齐参数。`SafeAreaView` 只给自己的 padding 或 margin 加刘海和手势条。
|
|
36
|
+
绝对定位的按钮要放进它内部的普通容器,不能指望套一层就自动避开。
|
|
37
|
+
|
|
38
|
+
## 常见改法
|
|
39
|
+
|
|
40
|
+
右上角固定按钮,只对父容器的顶边和右边:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"position": "absolute",
|
|
45
|
+
"top": 24,
|
|
46
|
+
"right": 24,
|
|
47
|
+
"width": 88,
|
|
48
|
+
"height": 88
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
底部左右各一颗按钮:两颗都 `position: "absolute"`、`bottom` 相同,左边那颗写 `left`,
|
|
53
|
+
右边那颗写 `right`,都保留设计宽高。
|
|
54
|
+
|
|
55
|
+
标题在父容器里水平居中:`position: "absolute"`、`left: "50%"`、`marginLeft` 为宽度的一半取负,
|
|
56
|
+
`top` 保持原距离。
|
|
57
|
+
|
|
58
|
+
背景铺满父容器,不跟安全区缩进去:`left` / `top` / `right` / `bottom` 都是 `0`,不写宽高。
|
|
59
|
+
画面用 `backgroundFit: "cover"`,需要完整留白时用 `"contain"`。
|
|
60
|
+
|
|
61
|
+
列表区域随屏幕变高、每一行尺寸不变:使用 `ScrollView` 作为列表容器,设置 `flexGrow: 1`,
|
|
62
|
+
行保持原宽高,不要把行压扁。容器高度需受父布局约束,内容超出时才能滚动;
|
|
63
|
+
普通 `Panel` 仅设置 `overflow: "scroll"` 只会裁切,不会获得滚动交互。
|
|
64
|
+
|
|
65
|
+
这套字段够用就只改这些。没有屏幕断点,也不要新造对齐模式字段。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: taptap-maker-local
|
|
3
|
-
description: Initialize, clone, inspect, preview, sync or submit a TapTap Maker game; open its local console (
|
|
3
|
+
description: Initialize, clone, inspect, preview, sync or submit a TapTap Maker game; open its local console, integrate selected LuaTween UI effects (UI 动效、选用交给 AI), create/edit canvas workflows, or diagnose Maker MCP. Not for unrelated code edits or maintenance of the Maker MCP repository itself.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# TapTap Maker Local Workflow
|
|
@@ -40,6 +40,7 @@ workflow then. Do not preload other Maker or ai-dev-kit Skills just because they
|
|
|
40
40
|
| status / workspace selection / resume after upgrade | [Project Context](references/project.md); maker://status or maker_status_lite. |
|
|
41
41
|
| missing/outdated AI dev kit | [AI Dev Kit Preparation](references/dev-kit.md); existing dev-kit update workflow. |
|
|
42
42
|
| open console / 打开make mcp控制台 | [Local Web Console](references/console.md); active CLI console open --target-dir <PROJECT> --json; omit target-dir only to show the project list. |
|
|
43
|
+
| selected UI motion / LuaTween / 选用交给 AI | [LuaTween UI Integration](references/ui-motion.md); reuse the selected effect and the original Lua library in the user's game. |
|
|
43
44
|
| canvas capabilities / custom workflows / templates / 画布 | [Canvas Capability Guide](references/canvas.md); query active CLI canvas capabilities, then read only the matching feature section. |
|
|
44
45
|
| canvas video / first-last frames / 首尾帧视频 | [Canvas Video](references/canvas-video.md); inspect mode and blockers before editing references or running. |
|
|
45
46
|
| local preview / refresh / stop / preview task iteration | [Local Window Preview](references/preview.md); CLI preview, never remote build. |
|
|
@@ -120,7 +120,7 @@ request/correlation ID, reproduction steps, visible Maker tools, client version,
|
|
|
120
120
|
Do not include the complete conversation. Send that JSON through stdin, never argv, while running:
|
|
121
121
|
|
|
122
122
|
```text
|
|
123
|
-
npx -y --package @taptap/maker@0.0.41-beta.
|
|
123
|
+
npx -y --package @taptap/maker@0.0.41-beta.4 taptap-maker mcp report --ide <client> --target-dir <project> --context-stdin --consent --json
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
Prefer the active client's exact Maker MCP `command` plus ordered `args`, then append the `mcp
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# LuaTween UI Integration
|
|
2
|
+
|
|
3
|
+
Use for a UI motion selection copied from the Maker console, or a request to add LuaTween
|
|
4
|
+
effects to an existing game. A selection authorizes local integration and requested testing,
|
|
5
|
+
not asset generation, publication, remote build, or replacement of the game's entry point.
|
|
6
|
+
|
|
7
|
+
## Read the selected reference
|
|
8
|
+
|
|
9
|
+
- Resolve the user's current game and target widget first. The console's demo resource label
|
|
10
|
+
is not a game directory. If the target is genuinely ambiguous, ask which UI should receive
|
|
11
|
+
the effect; do not ask the user to choose a library or manually install it.
|
|
12
|
+
- Read the copied selection: family, scene/clip or skin/effect ID, and intended target.
|
|
13
|
+
Apply only the chosen effect to existing UI unless the user requests the complete example.
|
|
14
|
+
- Read the supplied `/ui-motion/runtime-reference` JSON (or downloaded reference package).
|
|
15
|
+
`files` contains `{path, content}`; these are delivery paths, not already-installed files.
|
|
16
|
+
Read `docs/LuaTween-integration.md`, `docs/luatween/README.md`, and the relevant sections
|
|
17
|
+
of `docs/luatween/LuaTween.md`. `library` identifies the exact source and SHA-256.
|
|
18
|
+
- For motion-lab selections read `scripts/MotionLabRecipes.lua` and the selected entry in
|
|
19
|
+
`assets/ui/motion-lab-v1/catalog.json`. For NanoVG scenes read
|
|
20
|
+
`assets/ui/nanovg-showcase-v1/showcase.json` and the selected `motion/*.json`. For image UI
|
|
21
|
+
read the selected `/ui-motion/original-reference?id=...`, UI.json,
|
|
22
|
+
`scripts/ImageMotionRecipes.lua` and the matching `S01–S05RedesignDemo.lua`.
|
|
23
|
+
In a downloaded package, use `ui-motion-native/catalog.json` and its matching files
|
|
24
|
+
instead of fetching the original computer's image UI reference URL.
|
|
25
|
+
- If a loopback link is stale, use the active distribution's `console status/open --no-open
|
|
26
|
+
--json` to find its current origin, then verify the library identity before continuing.
|
|
27
|
+
An AI running on another computer cannot use the original computer's loopback URL: use
|
|
28
|
+
the downloaded reference JSON instead. Do not silently switch to a different library.
|
|
29
|
+
|
|
30
|
+
## Place only what the game needs
|
|
31
|
+
|
|
32
|
+
1. Before writing, search the whole game for LuaTween source, require paths (including
|
|
33
|
+
aliases/wrappers), its update owner, and existing motion/event bindings on the target
|
|
34
|
+
widget. A missing `scripts/LuaTween.lua` alone does not mean the library is absent.
|
|
35
|
+
The bundled file adds usage comments only; `library.upstreamSha256` identifies the
|
|
36
|
+
original without those comments. A comment-only hash difference is not incompatibility.
|
|
37
|
+
Reuse an identical or verified compatible original module at its existing path, with
|
|
38
|
+
its existing update owner and bindings. For partial integration, add only missing pieces;
|
|
39
|
+
repeating the same request must not duplicate the library, scheduler or event binding.
|
|
40
|
+
If the module is custom or incompatible, explain the conflict and confirm how to proceed
|
|
41
|
+
before replacing shared code; never overwrite it silently or add a second scheduler.
|
|
42
|
+
2. If absent, copy the exact `files` entry `scripts/LuaTween.lua` into the game's `scripts/`
|
|
43
|
+
directory, or follow its established Lua module layout. Verify the supplied SHA-256.
|
|
44
|
+
Default usage is `local LuaTween = require('LuaTween')`. Do not alter the original library.
|
|
45
|
+
3. Keep the selected effect in the game's existing UI module (or its normal component
|
|
46
|
+
directory). Reuse the reference's timing, easing and property/path sequence with real
|
|
47
|
+
`To`, `Value`, `Path` or `Sequence` calls. Adapt bindings to the target widget; do not
|
|
48
|
+
reimplement interpolation or tween only a clock while manually interpolating properties.
|
|
49
|
+
4. Import only needed recipe/adapter dependencies. Do not copy every demo, skin, native
|
|
50
|
+
host, browser renderer or Fengari into the game. If the user only wants motion, retain
|
|
51
|
+
the game's visuals. If they want the example UI too, preserve its editable layers and
|
|
52
|
+
import only the chosen design's PNG/fonts/UI.json, retaining font licenses.
|
|
53
|
+
5. Media entries provide `path`, stable `url` and `sha256`; download only required files
|
|
54
|
+
and verify them before use. Treat supplied paths as project-relative and check containment
|
|
55
|
+
and existing files before extraction. Never bulk-overwrite a project with the reference.
|
|
56
|
+
|
|
57
|
+
## Connect and verify in the game
|
|
58
|
+
|
|
59
|
+
- Attach the trigger to the actual button, panel or scene. Ordinary playback must use the
|
|
60
|
+
project's single `LuaTween.Update(dt)` owner. If absent, add one at the appropriate host
|
|
61
|
+
update hook; never add an Update subscription per animated component.
|
|
62
|
+
- Preserve base transforms and the target's input behavior. Handle repeated triggers,
|
|
63
|
+
pause/resume and re-entry. On close/destroy, kill only this component's owned handles;
|
|
64
|
+
never use global `KillAll`/`Clear`. Seeking for inspection must not trigger game rewards,
|
|
65
|
+
network calls or other business completion callbacks.
|
|
66
|
+
- Test through the project's normal local preview/validation workflow. Actually trigger
|
|
67
|
+
the target control, trigger repeatedly, close while moving, reopen and verify the effect
|
|
68
|
+
again. Check that unrelated animations still run and the existing UI remains usable.
|
|
69
|
+
Network games retain their network preview requirements; do not bypass them.
|
|
70
|
+
- A passing unit test, loaded window or screenshot alone is not interaction acceptance.
|
|
71
|
+
Report actual observations and any unverified visual/input paths honestly.
|
|
72
|
+
- Tell the user which UI now has the effect, how to trigger it, where the library and
|
|
73
|
+
integration code live, and what was verified. Do not require them to read the library.
|