@taptap/maker 0.0.41-beta.2 → 0.0.41-beta.3

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.
@@ -46,15 +46,28 @@ Lua LSP/Python 状态在后台异步检查,同一时刻只执行一次;首
46
46
  “其他”是独立的控制台页面,支持 ?page=other 直达,默认打开“UI 动效”,左侧依次为“项目检查”和“UI 动效”。
47
47
  内部切换不修改顶部主导航;离开“其他”后整个工具区隐藏。
48
48
  UI 动效随 Maker 包分发,由同源的 /ui-motion 页面承载,无需选择项目或运行额外演示服务器。
49
- “NanoVG 绘制”排在第一位并默认展示,包含四个完整界面与三个转场的大卡片;未配置本机示例时使用 Canvas 2D 候选,不代表 NanoVG 原生实现验收通过。
50
- 参考项目另有 `ui-motion-vector-sample/index.html` 时,可提供本机 NanoVG 示例。
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
- 本机示例包含可编辑 UI.json、独立 PNG 与原生入口,AI 接入指令指向该参考项目。
65
+ 随包参考包含可编辑 UI.json、独立 PNG 与原生入口,AI 接入指令指向当前包实际执行的源码。
53
66
  本机示例的体验弹窗随窗口高度布局,嵌入页通过 `embed=1` 调整画面与关键帧区域;轨道较多时在时间轴内滚动。
54
67
  转场卡片的演示播完后保留所选转场,支持重播、逐帧定位和进入目标界面;游戏内按钮仍按正常流程切页。
55
- `/ui-motion/vector-sample` 只读提供该文件,不随包收录;网页回放与游戏 NanoVG 入口分别标明。
56
- 参考项目提供 `ui-motion-lab/index.html` 时,“NanoVG 绘制”底部增加“更多动效”,在控制台内打开。
57
- 该本机工坊按六类提供 36 组动效与 7 种按钮反馈,支持七套按视觉关键词命名的 UI 风格、组件点击、重播和 33 项顺播。
68
+ `/ui-motion/vector-sample` 默认呈现随包示例;本机覆盖只保留素材和布局,使用当前包 LuaTween 播放。网页与游戏 NanoVG 入口分别标明。
69
+ “NanoVG 绘制”底部提供“更多动效”,在控制台内打开随包工坊。
70
+ 该工坊按六类提供 36 组动效与 7 种按钮反馈,支持七套按视觉关键词命名的 UI 风格、组件点击、重播和 33 项顺播。
58
71
  界面仅展示普通 UI 组件和必要操作符号,不包含角色、怪物、游戏专属标记或特色道具插图。
59
72
  左侧展示按钮、弹窗、列表、物品、对话与奖励,右侧目录可滚动;保持横屏画面,不显示底部时间轴。
60
73
  风格通过左右小三角循环切换,底部当前名称可展开七套界面列表,支持上下滚动与键盘选择。
@@ -66,7 +79,7 @@ UI 动效随 Maker 包分发,由同源的 /ui-motion 页面承载,无需选
66
79
  径向菜单、弹性回弹与磁铁拖拽标注为自动演示;游戏业务与真实拖拽由接入方实现。
67
80
  `/ui-motion/motion-lab` 仅只读提供固定文件,沿用本机示例的路径、大小与 CSP 限制;
68
81
  工坊文件上限为 48 MiB,其余本机示例仍为 24 MiB。
69
- 无该文件时不展示入口。AI 接入指令指向参考项目的目录、Lua、字体及使用说明。
82
+ 未指定本机参考目录时使用随包工坊;显式指定的目录缺少该文件时不展示工坊入口。AI 指令以当前包实际源码为准。
70
83
  “图片 UI”展示五个游戏项目界面(主菜单、角色选择、剧情对话、绒幕星仪剧场、章节剧场)与三个转场,
71
84
  使用已审核原创设计经 Maker 画布生成/分离的独立 PNG、可编辑 UI.json、原生 Lua 及其导出的时间线。
72
85
  当前通过 UI 组件的 `backgroundImage` 绘制图片;图集帧与序列帧动画可使用引擎 `UI.Sprite`。
@@ -75,10 +88,11 @@ UI 动效随 Maker 包分发,由同源的 /ui-motion 页面承载,无需选
75
88
  该目录应含 ui-motion-native/catalog.json;控制台仅只读提供清单中列出的预览文件、PNG、UI.json、Lua 和字体。
76
89
  清单上限 1 MiB,文件和图片列表各最多 1024 项;参考包文本累计上限 32 MiB,
77
90
  单文件读取上限 24 MiB。超限清单不接入;参考包正文及文件超限时在读取正文前返回 413。
78
- 原素材留在本机,不自动复制进公开仓库或安装包。未配置时原版卡片显示待接入,不用矢量候选替换。
91
+ 已审核的官方素材经授权登记示例资源库,图片无损压缩并校验 CDN;字体保留许可证。
92
+ 本机覆盖仍只读,不自动上传用户自定义素材。未配置目录时展示官方图片 UI,不用矢量候选替换。
79
93
  动效库不加载或提供视频、整屏原片抽帧、原帧人物序列;素材路由仅允许实际使用的独立图片和字体,
80
94
  旧 web-demo / web-demo-clockwork 研究目录不再接入;未列入新清单的文件返回 404,媒体播放由 CSP 禁止。
81
- 卡片预览取同一套 PNG 与 UI.json 的静态渲染;人物轨迹网格仅包含坐标与独立生成纹理,不包含原片人物序列。
95
+ 卡片预览取同一套 PNG 与 UI.json 的静态渲染;人物动作使用独立生成的姿态图,不包含原片人物序列。
82
96
  GET /ui-motion/original-reference?id=S01 返回适配后的源码、独立素材路径和读取地址;
83
97
  参考包包含精确文件清单、来源画布、UI 路径、脚本、素材 SHA-256 与未实现边界。接入层不改写游戏文件。
84
98
  选用后的 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.2", "taptap-maker"]
163
+ args: ["-y", "-p", "@taptap/maker@0.0.41-beta.3", "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.2 -- taptap-maker
268
+ "<绝对 node.exe>" "<绝对 npm-cli.js>" exec --yes --package @taptap/maker@0.0.41-beta.3 -- 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.2 taptap-maker help
276
+ npx -y -p @taptap/maker@0.0.41-beta.3 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.2 taptap-maker mcp install --launcher self
299
+ npx -y -p @taptap/maker@0.0.41-beta.3 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.2 taptap-maker mcp report --ide <client> --target-dir <project> --context-stdin --consent --json
331
+ npx -y --package @taptap/maker@0.0.41-beta.3 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taptap/maker",
3
- "version": "0.0.41-beta.2",
3
+ "version": "0.0.41-beta.3",
4
4
  "type": "module",
5
5
  "description": "TapTap Maker local development CLI and MCP server",
6
6
  "main": "dist/maker.js",
@@ -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 (打开make mcp控制台), create/edit canvas workflows (画布、首尾帧视频、自定义模板), or diagnose Maker MCP. Not for unrelated code edits or maintenance of the Maker MCP repository itself.
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.2 taptap-maker mcp report --ide <client> --target-dir <project> --context-stdin --consent --json
123
+ npx -y --package @taptap/maker@0.0.41-beta.3 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.